# View or preview a file

## Overview

[Video: View or preview a file](https://www.youtube.com/watch?v=6eOlDKpyKxs)

This flow describes how to open a [file](https://docs.ohc.network/concepts/clinical/files.md) in the **File Preview** of the **Files** tab, and how to play an audio file. For the types of file that have no preview, see [Download a file](https://docs.ohc.network/flows/clinical/files/download-a-file.md).

## Pre-requisites

* The file is uploaded to the patient or to the encounter that you work with.
* If you want to see the content of the file, the file is not archived.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can view clinical data about patients | Open and play the patient files. With Can Read encounter, also open and play the encounter files. Hold it through [a role on the patient](https://docs.ohc.network/concepts/clinical/files.md#permissions). By default, Staff, Doctor, Nurse and Facility Admin hold it. |
| Can Read encounter related clinical data | Open and play the encounter files, also after the encounter is closed. Hold it in a [department](https://docs.ohc.network/concepts/facility/department.md) of the encounter or of its current location. By default, Doctor, Nurse and Facility Admin hold it. |
| Can Read encounter | Lists the encounter files, together with Can view clinical data about patients. Hold it through a role on the encounter. By default, Doctor, Nurse and Facility Admin hold it. |

To open a file, you must first see it in the list. For the rules of the list, see [Find a file](https://docs.ohc.network/flows/clinical/files/find-a-file.md).

To view or play a file, you need only these read permissions.

## Steps

### 1. Find the file

Open the **Files** tab of the patient or of the encounter.

Find the file in the list. For the full steps, see [Find a file](https://docs.ohc.network/flows/clinical/files/find-a-file.md).

![The row of Chest X-ray.jpg in the Files list, with its View button](/assets/images/view-or-preview-a-file-1-27cba55adc60375e82591e2750432ad6.webp)

### 2. Open the file

The button in the row depends on the type of the file.

| Type of file | Button in the row |
| - | - |
| PDF: .pdf | **View** |
| Image: .jpg, .jpeg, .png, .gif and .webp | **View** |
| Video: .mp4, .mov, .avi, .wmv and .ogg | **View** |
| Audio: .mp3 and .wav | **Play**. See step 6. |
| Other files, such as .bmp, .txt, .csv, .rtf, .doc, .odt, .xls, .xlsx and .ods | No **View** and no **Play**. Download the file instead. See [Download a file](https://docs.ohc.network/flows/clinical/files/download-a-file.md). |

Select **View** in the row of the file.

On a small screen, such as a phone, tap the row of the file.

Care opens the **File Preview**. The preview shows the name of the file, and **Created On** with the upload date.

If the file is archived, **View** opens only the **Archived file** dialog. The dialog shows why, by whom and when the file was archived, but not its content.

![The File Preview of Chest X-ray.jpg, with Created On and the upload date](/assets/images/view-or-preview-a-file-2-fa8caee99e386ed64b88538ffe06971a.webp)

### 3. Use the preview controls

The controls in the preview depend on the type of the file.

| Type of file | What you can do |
| - | - |
| Image | Select **Zoom In** or **Zoom Out**. Select **Rotate Left** or **Rotate Right**. Select **Reset** to undo the zoom and the rotation. You can also zoom with the mouse wheel, a pinch or a double click. Drag the image to move it. You can zoom from a quarter of the fitted size up to two times the fitted size. |
| PDF | Select **Previous** or **Next** to go to another page. Care shows the page number and the total number of pages. Select **Print** to print the file. Select **Open in browser** to open the file in a new browser tab. |
| Video | Care opens the video in the video player of your browser. Use the controls of that player. |

![The image controls Zoom In, Reset, Zoom Out, Rotate Left and Rotate Right under a rotated image](/assets/images/view-or-preview-a-file-3-1d21107b8550779f418047ced8fb7db4.webp)

Note: The **Print** button shows after the PDF loads. You can also press `p` to print. If printing fails, Care shows **Print failed**.

Note: Outside the Safari browser, Care does not play a .mov video. Care shows **MOV file not supported in this browser** and a **Download to play locally** button.

Note: If your browser cannot play videos, Care shows **Your browser does not support video playback.**

### 4. Download the file

To save the file on your device, select **Download** in the preview.

If the download fails, Care shows **Failed to download file**.

### 5. Move to another file

If the page of the list has more than one active file, the preview shows two arrows.

Select an arrow to open the previous file or the next file.

The arrows move only through the active files on the current page. They go from the oldest file to the newest.

If you move to a file that Care cannot show, the preview shows **Can't preview this file. Try downloading it.** Select **Download** to save that file.

![The arrow to the previous file on the left of the File Preview](/assets/images/view-or-preview-a-file-4-6089e577cf7fe7e1b4f23d9114e4862d.webp)

![The File Preview of Blood test report.pdf, with Previous, the page number and Next](/assets/images/view-or-preview-a-file-5-80345919d385bcc1b7fd58683586df3d.webp)

### 6. Play an audio file

If the file is an .mp3 or .wav file, select **Play** in the row of the file. On a small screen, tap the row.

Care opens the **Play Audio** dialog.

Use the play and pause button, the seek bar and the mute button. The dialog shows the time played and the total time.

![The Play Audio dialog with the play and pause button, the time, the seek bar and the mute button](/assets/images/view-or-preview-a-file-6-7d946603b0b84862e973f18ba3a4fc38.webp)

## Expected Outcome

* Care shows the image or the PDF file in the **File Preview**.
* For a video, Care opens the video player of your browser in the **File Preview**.
* Care plays an .mp3 or .wav file in the **Play Audio** dialog.
* For an archived file, Care shows why, by whom and when the file was archived. Care does not show the content.
* For a file that has no **View** or **Play**, you download the file and open it on your device.

## Related

Concepts:

* [Files](https://docs.ohc.network/concepts/clinical/files.md)

Flows:

* [Find a file](https://docs.ohc.network/flows/clinical/files/find-a-file.md)
* [Download a file](https://docs.ohc.network/flows/clinical/files/download-a-file.md)
* [Upload a file](https://docs.ohc.network/flows/clinical/files/upload-a-file.md)
* [Rename a file](https://docs.ohc.network/flows/clinical/files/rename-a-file.md)
* [Archive a file](https://docs.ohc.network/flows/clinical/files/archive-a-file.md)
