> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/digital-asset-management-dam/settings/storage/upload.md). Agents can also search and read this documentation through its [MCP server](https://docs.scaleflex.com/~gitbook/mcp).

# Upload

Use the upload settings to control how DAM names files, handles duplicates and processes images when they are added to the library.

The upload setting can be managed under the *Settings / Library / Storage/ Upload menu.*

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F5Gg3rHmnoEGbovF205mq%2FScreenshot%202026-10-23%20at%2018.13.44.png?alt=media&amp;token=33b31189-59de-4bbf-975a-99d4e3a6b8f8" alt=""><figcaption></figcaption></figure>

### Settings at a glance

| Duplicated file                                     | What happens when the uploaded file's content already exists.                                   |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Same name                                           | What happens when a file with the same name but different content already exists in the folder. |
| File name                                           | How uploaded assets are named.                                                                  |
| Enforce original file name format control at upload | Blocks files whose names do not match a regular expression.                                     |
| Optimize images on upload                           | Resizes large images during upload.                                                             |
| Similar asset check                                 | Compares uploaded images with similar assets in the project.                                    |
| Background removal                                  | Where the image version with the background removed is stored.                                  |
| Expanded background                                 | Where the image version with an expanded background is stored.                                  |

### Duplicate check

DAM compares files by hash, so two files are treated as having the same content only if their hash values are identical.

{% hint style="warning" %}
DAM always rejects a file that is uploaded to the same folder with the same name and the same content as a file that already exists there. This is system behavior and cannot be changed.
{% endhint %}

The following settings cover the other cases.

| Duplicated file | Accept, Refuse                | Sets the rule for an uploaded file whose content is a duplicate of an existing asset.                         |
| --------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Same name       | Refuse, Override, New version | Sets the rule for a file that has the same name as an existing file in the same folder but different content. |

The options of **Same name** work as follows:

* **Refuse:** the new file is not uploaded and the existing asset is not changed.
* **Override:** the new file replaces the existing asset and the old one is deleted permanently
* **New version:** the new file is saved as a new version of the existing asset and the old one is available for recovery

If some files in a bulk upload in the Hub are refused, DAM shows a notification and uploads the remaining files normally.

### **File Name**

Sets how assets are named once they are uploaded. Possible options are:

| Assign a random file name in UUID format     | The original name is replaced by a UUID. The original name is not kept anywhere.                                 | `white and black penguin.jpg` becomes a UUID-based name |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Keep original file name with a random suffix | A hyphen and a random 8-character suffix are added before the extension. The suffix is always added.             | `white and black penguin-JtUHZiug.jpg`                  |
| Keep original file name                      | The file keeps its name. The **Same name** rule decides what happens if the name is already taken in the folder. | `white and black penguin.jpg`                           |

### Enforce original file name format control at upload

Enforce strict naming conventions for incoming assets using a custom regular expression (Regex). A file whose name does not match the expression is rejected.

#### Regex rules <a href="#regex-rules" id="regex-rules"></a>

* It must define the entire file name, **including the extension**.

Example: `^[a-z0-9_-]+\.(jpg|png)$` accepts file names that consist of lowercase letters, digits, underscores and hyphens, and end in `.jpg` or `.png`.

#### Scope

* Choose where the rule is applied. You can select one or both:

  * **Hub upload:** if a file name does not match the Regex, the upload is blocked and an error message is shown.&#x20;
  * **API upload:** DAM validates file names on the server for headless API endpoints and rejects non-compliant assets. The rejected request returns the status `403 Forbidden`.&#x20;

  The rule applies to new uploads in all folders.

  In a bulk upload, only the non-compliant files are blocked. The Hub shows a notification for them, and the other files are uploaded successfully.

> Scope Limitation:
>
> * Dependency: This is automatically disabled if *Assign a random file name* is selected. It can only be activated when either of the other two *File name* options is selected.

### **Optimize images on upload**

When enabled, DAM resizes images during upload to save storage and speed up later actions such as image editing and creating variants.

* When you enable the feature, you set the default maximum width and maximum height.
* Images that are smaller than these values are left unchanged.
* The original file is replaced by the resized version. The original is not kept.
* The optimization applies to image files such as JPG, PNG and GIF.
* It applies to Hub uploads only, not to API uploads.
* Optionally, turn on the toggle that lets users set their own resize values. In that case the uploader shows a form where the user can enter custom values to optimize the image. Users can enter values that are higher than the administrator's defaults.

| Setting                                    | Description   |
| ------------------------------------------ | ------------- |
| `Operation`                                | Resize        |
| `Max width`                                | In pixels     |
| `Max height`                               | In pixels     |
| `Allow users to optimize images on upload` | ON/OFF toggle |

### Similar asset check

When enabled, users can check images during upload against similar assets already in the library and skip them before they are uploaded. The confidence level controls the similarity threshold used for matching.

| Setting          | Description                                       |
| ---------------- | ------------------------------------------------- |
| Confidence level | <ul><li>Low</li><li>Medium</li><li>Huge</li></ul> |

### Background-removal

Controls where DAM stores the new image version with the background removed.

* **Internal folder (recommended):** the new version is not shown as a separate asset in DAM. Users find it as a variation in the **Details** view of the main asset.
* **Same folder as the original asset:** the new version is uploaded as an independent asset. It is named with the suffix `background-removal`. Users can edit, rename or delete this file.

### Expanded background <a href="#expanded-background" id="expanded-background"></a>

Controls where DAM stores the new image version with an expanded background.

* **Internal folder (recommended):** works as described for background removal.
* **Same folder as the original asset:** the new version is uploaded as an independent asset with the suffix `expanded-background`. Users can edit, rename or delete it.

#### Storage and the same-folder option <a href="#storage-and-the-same-folder-option" id="storage-and-the-same-folder-option"></a>

* Files stored in the internal folder also count toward your storage quota.
* If you store the transformation in the same folder and the original is later deleted, the transformation remains accessible.
* If a user deletes the transformation stored in the same folder by mistake, the original asset still references it, and the reference then points to a missing file ("File Not Found").

### AI credits <a href="#ai-credits" id="ai-credits"></a>

Similar asset check, Background removal and Expanded background require Visual AI credits and an active [post-process.](https://docs.scaleflex.com/digital-asset-management-dam/settings/automations/post-processing.md)
