# Upload files

Upload images, videos and sounds to the CDN, copy the links, organize folders, rename, move, send to the trash and delete forever.

Source: https://fivedash.fivex.gg/docs/en/cdn/upload-files

**CDN → Files** is the city's warehouse: folders on the left, files in the middle and each one's details on the right. You upload by dragging from your computer, copy the link ready for the script and organize everything into folders. This page is for the staff who handle the server's media.

[Video: how to do it in under 20 seconds](https://fivedash.fivex.gg/docs/videos/cdn-files-en.mp4)

## Before you start

* **CDN created:** see [CDN](https://fivedash.fivex.gg/docs/en/cdn/overview).
* **Access level** on **Files**:

| What to do                                                                    | Level needed  |
| ----------------------------------------------------------------------------- | ------------- |
| See files, open the preview and copy links                                    | **View**      |
| Upload, create folders, rename, move, favorite, send to the trash and restore | **Manage**    |
| Delete forever and empty the trash                                            | **Configure** |

## The files screen

| Part    | What's there                                                                                                                                                                                                                                 |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Sidebar | **Create** (with **Upload** and **New folder**), **All files**, **Recent** (uploaded in the last 14 days), **Favorites**, **Folders** and **Trash**. At the bottom, the space used ("…% of the space in use") and **See usage and traffic**. |
| Top     | Search (**Search everything**), the **All** / **Images** / **Videos** / **Audio** filter, **Sort by** and **View** (**Grid** or **List**).                                                                                                   |
| Details | The link, the hits and the information of the selected file or folder.                                                                                                                                                                       |

## Upload files

### Open the folder

In **CDN → Files**, open the folder where the file will go.

### Upload

Drag images, videos and audio from your computer onto the list ("Drop to upload"), or click **Create** → **Upload** and pick the files. To upload straight into a subfolder, drop the files on it.

### Follow the uploads

The **Uploads** tray shows each file's progress ("… of … · …%"), **Optimizing…** for optimized images, and the result. Use **Cancel …** or **Retry …** on each item.

### Copy the link

Click the file and copy the **Public link** in the details panel, or use **Copy link** in the file's menu.

### Panel upload limits

| Item                       | Limit                                                            | Where to change it           |
| -------------------------- | ---------------------------------------------------------------- | ---------------------------- |
| Audio and videos           | The **Max size per file**: 25, 50, 100 (default) or 250 MiB      | **CDN → Settings → Uploads** |
| Images                     | 20 MiB                                                           | —                            |
| Formats                    | PNG, JPEG, WebP, GIF, SVG, MP4, WebM, MOV, MP3, OGG, WAV and M4A | —                            |
| Name already in the folder | The new file gets a number: `logo.png` becomes `logo-1.png`      | —                            |

> With **Optimize images** on, PNG, JPEG and WebP become WebP on upload and the final version replaces the original. Image options apply to new uploads. See [Usage and limits](https://fivedash.fivex.gg/docs/en/cdn/usage-and-limits).

## Copy the link in a ready format

In the file's menu, **Copy as** gives you the link already in the format the place needs:

| Option       | For                              | Example of what it copies                                                                                          |
| ------------ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Link**     | The file's address               | `https://cdn.fivex.sh/example-city/itens/agua.png`                                                                 |
| **Lua**      | `config.lua` and scripts         | `"https://cdn.fivex.sh/example-city/itens/agua.png"`                                                               |
| **HTML**     | The NUI and the loading screen   | `<img src="…" alt="agua">` (video: `<video … autoplay muted loop playsinline>`; audio: `<audio … preload="auto">`) |
| **CSS**      | NUI or loading screen background | `background-image: url("…");` (not shown for audio)                                                                |
| **Markdown** | Discord messages                 | `![agua](…)` for images; the link for video and audio                                                              |

Select several files to **Copy … links** at once (one per line). On a folder, **Copy folder link** copies its address.

## Create a folder

### Open the dialog

Click **Create** → **New folder** (the folder is created inside the open folder).

### Name it

Type the name. It becomes part of the link ("In the link: …"): letters, numbers, hyphens and periods, and spaces become hyphens.

### Create it

Click **Create folder**. "Folder … created" shows up.

## Rename

Select the file or folder and press **F2**, or use **Rename** in the menu. Type the new name and save. For a file, the extension stays the same.

> The link changes too: update the address in scripts that use the old one.

## Move

* **By dragging:** drag the file or folder onto another folder (in the list or the sidebar).
* **From the menu:** **Move to…** (or **Move … items…** with several selected), pick the **Destination** and click **Move to …**.

After moving, the "Moved to …" notice has **Undo**. A folder can't go inside itself. Moving also changes the link.

## Favorites

Use **Favorite** in the file's menu to star it. Favorites show in **Favorites** in the sidebar and, by default, are never deleted by automatic retention.

## Trash

### Send to the trash

Select and press **Del**, or use **Move to trash** in the menu. The link stops working right away.

### Restore, if needed

Open **Trash** in the sidebar, select and click **Restore** (or **Restore … items**). The link works again.

### Or delete forever

In **Trash**, select and click **Delete forever**, or click **Empty trash** to delete everything. Confirm.

| What happens                    | When                                                                      |
| ------------------------------- | ------------------------------------------------------------------------- |
| The link stops working          | As soon as the item goes to the trash                                     |
| The item is gone for good       | 30 days after it went to the trash ("Gone in … days")                     |
| The space goes back to the plan | After **Delete forever** or the end of the 30 days, once cleanup finishes |

> **Delete forever** and **Empty trash** can't be undone. The links stop working and the space goes back to the plan. A folder in the trash takes everything inside it.

## Preview and details

Click a file to see its details. Press **Space** (or **Preview**) to open the preview, with arrows for the **Previous file** and the **Next file**.

| Detail                                       | What it shows                                                                     |
| -------------------------------------------- | --------------------------------------------------------------------------------- |
| **Public link**                              | The file's link, to copy.                                                         |
| **Hits in the last 30 days**                 | A chart of hits per day and the traffic counted.                                  |
| **Served as**                                | The format served (for example, WebP after optimization).                         |
| **Dimensions**                               | Width and height, for images and videos.                                          |
| **Folder**, **Uploaded by**, **Uploaded on** | Where it is, who uploaded it (a person or "Chave: …" for an upload key) and when. |
| **Retention**                                | When automatic retention sends the file to the trash, if it's on.                 |

On a folder, the details show the **Folder address** and the **Inventory images** shortcut (see [Integrations](https://fivedash.fivex.gg/docs/en/cdn/integrations)).

## Keyboard shortcuts

| Key               | What it does                                             |
| ----------------- | -------------------------------------------------------- |
| `/`               | **Search**                                               |
| Space             | **Preview**                                              |
| Ctrl + C          | **Copy link** of the selected files                      |
| F2                | **Rename**                                               |
| Del               | Send to the **Trash** (in the trash: **Delete forever**) |
| Ctrl + A          | **Select all**                                           |
| Arrows, Home, End | Move between items (Shift selects several)               |
| Enter             | Open the folder or the preview                           |
| Esc               | Clear the selection or the search                        |

## FAQ

**Search doesn't find the file.**
Search looks at the names of every file and folder, in any folder. Check the type filter (**All**) and whether the file is in the **Trash** (use **Search the trash**).

**I got "select up to 500 items per operation."**
Move, restore or delete in batches of up to 500 items.

**I replaced an image keeping the same name and the game shows the old one.**
In **CDN → Settings → Cache**, click **Purge cache**.

## Next steps

[Upload keys](https://fivedash.fivex.gg/docs/en/cdn/upload-keys)Let scripts upload on their own.
[Integrations](https://fivedash.fivex.gg/docs/en/cdn/integrations)Use the links in the inventory and the NUI.
[Usage and limits](https://fivedash.fivex.gg/docs/en/cdn/usage-and-limits)How much storage and traffic is left.
[CDN](https://fivedash.fivex.gg/docs/en/cdn/overview)How the CDN works.
