File Uploader options

Here is a list of all available options for the File Uploader configuration.

pubkey

Your project's Public Key.
Type: string

multiple

Allow multiple files to be uploaded.
Type: boolean
Default: true

multipleMin

Minimum number of files that can be selected.
Type: number
Default: 0 - means no limit

multipleMax

Maximum number of files that can be selected.
Type: number
Default: 0 - means no limit

confirmUpload

Enables user confirmation for starting uploads.
Type: boolean
Default: false

imgOnly

Accept images only.
Type: boolean
Default: false

accept

Native file input accept attribute value. Also affects client validation settings.
Type: string
Default: ''

externalSourcesPreferredTypes

Defines the list of preferred MIME types for external sources. The list should be ordered and contain space-separated MIME types. Common parts can be marked with asterisks: image/* application/vnd.openxmlformats-officedocument.*. If no MIME types match the criteria or preferred types aren’t set, default formats are used. Keep in mind that some cloud services can export data in different formats. For example, Google document can be exported as Word document, PDF or plain text.
Type: comma separated string
Default: ''

store

Store uploaded files. See File storing behavior for details.
Type: boolean | 'auto
Default: 'auto'

cameraMirror

Type: boolean
Default: false

sourceList

Comma-separated list of file sources.
Type: comma separated string
Default: 'local, url, camera, dropbox, gdrive'

Full source list:

  • local
  • url
  • camera
  • dropbox
  • gdrive
  • facebook
  • gphotos
  • instagram
  • flickr
  • vk
  • evernote
  • box
  • onedrive
  • huddle

maxLocalFileSizeBytes

Maximum size in bytes for local files.
Type: number
Default: 0 - means no limit

thumbSize

Thumbnail size for images.
Type: number
Default: 76

showEmptyList

Show the upload list even if it is empty.
Type: boolean
Default: false

useCloudImageEditor

Enable cloud image editing.
Type: boolean
Default: true

cloudImageEditorTabs

Defines the list of tabs in the cloud image editor. Order matters.
Available values:

Type: comma separated string
Default: 'crop,tuning,filters'

cropPreset

Defines the crop behavior. When uploading images, your users can select a crop area with a defined aspect ratio.
When useCloudImageEditor is enabled and there is a single file selected, the image editor will be opened automatically. In the other case, images will be cropped automatically with centred alignment without opening the image editor.
Expected format: 'width:height'. For example, '1:1' stands for the square crop. Empty string '' means free crop.
Type: string
Default: ''

remoteTabSessionKey

Key to revoke Custom OAuth access. See OAuth docs for details.
Type: string
Default: ''

cdnCname

Set Custom CNAME. See Custom CNAME docs for details.
Type: string
Default: 'https://ucarecdn.com'

baseUrl

Set a custom upload URL. Type: string
Default: 'https://upload.uploadcare.com'

socialBaseUrl

Set a custom social sources URL
Type: string
Default: 'https://social.uploadcare.com'

secureSignature

Set signature for Secure Uploads. See signed uploads docs for details.
Type: string
Default: ''

secureExpire

Set expire for Secure Uploads. See signed uploads docs for details.
Type: string
Default: ''

secureDeliveryProxy

Set a proxy URL template. See secure delivery docs for details.
Type: string
Default: ''

groupOutput

Enables files group creation.
Type: boolean
Default: false

metadata

Works as DOM property only. Defines the metadata to be added to uploaded files.
Type: Record<string, string> | (fileEntry: OutputFileEntry) => Promise<Record<string, string>> | Record<string, string>
Default: undefined

Whitelabeling. Removes copyright.
This feature is available on some paid plans.
Type: boolean
Default: false