> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.

# Core and upload behavior options

> File Uploader options: core and upload behavior.

Core options: your project key, how many files a user can pick, and what happens to files once they are uploaded.

Start here: `pubkey` is the only required option.

Related guides: [Configuration](/docs/file-uploader/configuration/), [Image shrink](/docs/file-uploader/image-shrink/), [File metadata](/docs/file-metadata/).

See [all options](/docs/file-uploader/options/) for the full list.

### pubkey \[#pubkey]

Your project's Public Key.

Attribute: `pubkey`

DOM property: `pubkey`

Type: `string`

### multiple \[#multiple]

Allow multiple files to be uploaded.

Attribute: `multiple`

DOM property: `multiple`

Type: `boolean`

Default: `true`

### multipleMin \[#multiple-min]

Minimum number of files that can be selected.

Attribute: `multiple-min`

DOM property: `multipleMin`

Type: `number`

Default: `0`

### multipleMax \[#multiple-max]

Maximum number of files that can be selected.

Attribute: `multiple-max`

DOM property: `multipleMax`

Type: `number`

Default: no limit. `0` also means no limit.

### confirmUpload \[#confirm-upload]

Enables user confirmation for starting uploads.

Attribute: `confirm-upload`

DOM property: `confirmUpload`

Type: `boolean`

Default: `false`

Available in: regular and inline modes

### store \[#store]

Store uploaded files. See [File storing behavior](/docs/uploads/storage/#file-storing-behavior) for details.

Attribute: `store`

DOM property: `store`

Type: `boolean | 'auto'`

Default: `'auto'`

### groupOutput \[#group-output]

Enables files group creation.

Attribute: `group-output`

DOM property: `groupOutput`

Type: `boolean`

Default: `false`

If every file uploads but creating the group fails, the collection reports a
`GROUP_ERROR`, with the failure on `payload.error`. Handle it when you rely on
the group URL: the files exist, only the group is missing.

### metadata \[#metadata]

Works as [DOM property](/docs/file-uploader/configuration/#how-to-define-dom-properties) only.

Defines custom metadata to be attached to uploaded files. This metadata is stored with the file and can be retrieved later via the Uploadcare API.

The metadata can be either:

* **Static object:** Fixed key-value pairs applied to all files
* **Dynamic function:** Computed per file based on file properties

**Function signature:** `(fileEntry: OutputFileEntry) => Promise<Record<string, string>> | Record<string, string>`

**Use cases:**

* Tagging files with categories, user IDs, or project names
* Adding custom processing flags
* Storing file-specific business logic data

Attribute: `-`

DOM property: `metadata`

Type: `Record<string, string> | ((fileEntry: OutputFileEntry) => Promise<Record<string, string>> | Record<string, string>) | null`

Default: `null`

### tags Since v1.32.0 \[#tags]

Works as [DOM property](/docs/file-uploader/configuration/#how-to-define-dom-properties) only.

Defines [tags](/docs/file-tags/) to be attached to uploaded files. Tags are stored with the file and can be used to categorize and filter files later via the Uploadcare API.

Tags set via this property are not validated or normalized client-side; see [File tags](/docs/file-tags/) for the normalization rules and constraints (lowercase, trimmed, deduplicated, max 50 tags, max 100 chars, `[a-z0-9\-_.]` only) enforced by the Upload API.

The tags can be either:

* **Static array:** A fixed list of tag strings applied to all files
* **Dynamic function:** Computed per file based on file properties

**Function signature:** `(fileEntry: OutputFileEntry) => Promise<string[]> | string[]`

**Use cases:**

* Categorizing files by type, source, or workflow stage
* Attaching user IDs or project names to files
* Grouping files for later search and filtering

Attribute: `-`

DOM property: `tags`

Type: `string[] | ((fileEntry: OutputFileEntry) => Promise<string[]> | string[]) | null`

Default: `null`

### imageShrink Since v0.33.0 \[#image-shrink]

Saves traffic and storage space by resizing images on a client before uploading.
See [shrink](/docs/file-uploader/image-shrink/) docs for details.

Attribute: `image-shrink`

DOM property: `imageShrink`

Type: `string`

Default: `''`

### checkForUrlDuplicates \[#check-for-url-duplicates]

**Applies to URL uploads only.**

Enables duplicate URL detection to prevent uploading the same file multiple times from the same URL source.

When enabled, the system checks if a file from the given URL has already been uploaded. If a duplicate is found, it provides the existing file immediately instead of re-uploading, improving performance and reducing storage costs.

**Technical behavior:** Runs duplicate check first, then provides immediate-download behavior for existing files.

Attribute: `check-for-url-duplicates`

DOM property: `checkForUrlDuplicates`

Type: `boolean`

Default: `false`

### saveUrlForRecurrentUploads \[#save-url-for-recurrent-uploads]

**Applies to URL uploads only.**

Optimizes performance for frequently uploaded URLs by caching the source URL for future uploads.

This feature is beneficial when you expect the same URL to be uploaded multiple times. It not only saves the URL for faster subsequent uploads but also updates existing references when the source URL content changes.

**When to use:** Enable this when users frequently upload files from the same URLs (e.g., content management systems, recurring document uploads).

**Performance benefit:** Reduces upload time for repeated URLs and automatically handles content updates.

Attribute: `save-url-for-recurrent-uploads`

DOM property: `saveUrlForRecurrentUploads`

Type: `boolean`

Default: `false`