> For the complete documentation index, see [llms.txt](https://docs.fivemstats.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fivemstats.net/panel/media.md).

# Media

Browse, upload, move and delete the screenshots, videos, audio and data files stored on your server.

Screenshots, videos, audio, JSON data files and your own uploads, stored on the game server. Files come from your scripts ([Screenshots and Uploads](https://docs.fivemstats.net/tgiann-fivem-stats-script/for-developers/screenshots-and-uploads.md)) and from uploads on this page.

{% hint style="warning" %}
Thumbnails, uploads and ZIP downloads need HTTPS on the game server. Without it the page shows **Needs HTTPS on the game server**. See [HTTPS](https://docs.fivemstats.net/tgiann-fivem-stats-script/https.md).
{% endhint %}

## Find a file

* **Folders**: open a folder to see it and its subfolders. The path at the top goes back up.
* **Search files**: by name, inside the open folder.
* **Type**: All, Images, Videos, Audio or JSON.
* **Dates**: files created between two days.
* **Player**: files that belong to a player or are about them (the target).
* **Grid** or **List** view.

Click a file for a full-size preview with its file id, link, size, player, target and metadata. A JSON file (for example a bodycam recording) has no preview: open or download it from its link.

The open folder, the filters and the open file are kept in the page address. Copy it to send someone the same view, and the browser's Back button returns from a folder or a file.

## Upload

**Upload** (or dropping files on the page) takes images, videos, audio and JSON files, plain `.json` or gzip compressed `.gz`. Files go from your browser straight to your game server, into the open folder. Images, videos and audio are converted like every other upload; a JSON file must be complete JSON and is stored as it is ([File formats](https://docs.fivemstats.net/tgiann-fivem-stats-script/media-service.md#file-formats)).

## Folders

* **New folder** makes a folder inside the open one.
* A folder's menu has **Rename** and **Download as ZIP**. Renaming moves every file in it.

## Select files

Click **Select**, then pick files (or **Select page**):

| Action               | What it does                                                                                                   |
| -------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Move**             | Moves the files to another folder                                                                              |
| **Keep forever**     | The files are never removed by the media retention                                                             |
| **Follow retention** | The files follow [Settings > Media storage](https://docs.fivemstats.net/panel/settings.md#media-storage) again |
| **Delete**           | Removes the files from the game server for good; their links stop working                                      |

{% hint style="info" %}
After a move or a folder rename, screenshot links keep working. A file a script uploaded with a name (for example `housing/photos/house_12.webp`) is then found at its new folder; a script that built the address itself has to use the new folder. See [File names and fixed addresses](https://docs.fivemstats.net/tgiann-fivem-stats-script/for-developers/screenshots-and-uploads.md#file-names-and-fixed-addresses).
{% endhint %}

## Clean up

**Clean up** deletes many files at once: pick the file types and, optionally, a date range. It works on the open folder and its subfolders, or on all media at the top. Files marked keep forever are skipped. It cannot be undone.

To delete old files automatically every day, set the days in [Settings > Media storage](https://docs.fivemstats.net/panel/settings.md#media-storage).

## Who can do what

A member with the **Media** page can browse, preview and download ZIPs. Uploading, new folders, renaming, moving, keep forever and deleting also need **Upload, move and delete files**. See [Members and Permissions](https://docs.fivemstats.net/panel/members-and-permissions.md).
