Basic Configuration
Your project’s Public Key. This is required to use the File Uploader.Default:
''Allow multiple file uploads.Default:
trueMinimum number of files to upload.Default:
0Maximum number of files to upload.Default:
Number.MAX_SAFE_INTEGERRequire user confirmation before uploading.Default:
falseGroup output files. When enabled, multiple files will be combined into a single group.Default:
falseFile Validation
Allow only image files.Default:
falseNative file input accept attribute value. Also affects client validation settings.Default:
''Maximum size of local files in bytes. Set to
0 for no limit.Default: 0Validators for individual files. This is an array of file validator functions.Default:
[]This is a complex type that must be set via JavaScript, not as an HTML attribute.
Validators for file collections. This is an array of collection validator functions.Default:
[]This is a complex type that must be set via JavaScript, not as an HTML attribute.
Timeout for async validation functions, in milliseconds.Default:
15000 (15 seconds)The number of files to validate concurrently.Default:
100Upload Sources
List of sources for file uploads. Comma-separated list of source names.Default:
'local, url, camera, dropbox, gdrive'Available sources:local- Local file systemurl- URL importcamera- Camera capturedropbox- Dropboxgdrive- Google Drivegphotos- Google Photosinstagram- Instagramfacebook- Facebookflickr- Flickrvk- VKevernote- Evernotebox- Boxonedrive- OneDrivehuddle- Huddle
Wrap the source list when it overflows.Default:
truePreferred types for external sources. This affects which file types are displayed first in external source pickers.Default:
''See External Sources Preferred Types for more details.Provide custom CSS to the social sources iframe.Default:
''Key to revoke Custom OAuth access. See OAuth docs for details.Default:
''Top-level origin for the uploader. This is used for Google Drive Picker if there is no access to the origin due to the cross-origin policy.Default:
''Camera Configuration
Default camera capture mode. Determines which camera is used by default.Default:
'''user'- Front-facing camera'environment'- Back-facing camera''- Browser default
Mirror the camera view horizontally.Default:
falseThe camera modes to enable in the camera modal. It is possible to select photo or video capture. The first mode is the default mode.Default:
'photo, video'The default tab to open in the camera modal.Default:
nullEnable audio recording in the camera modal.Default:
trueEnable video recording.Default:
nullThe maximum duration of the video recording in seconds. Set to
null for no limit.Default: nullA dictionary object that can contain properties from MediaRecorderOptions.Default:
nullThis is a complex type that must be set via JavaScript, not as an HTML attribute.
Storage & CDN
Store uploaded files permanently.Default:
'auto'true- Files are stored permanentlyfalse- Files are stored temporarily (24 hours)'auto'- Uses your project’s default storage setting
Set custom CNAME for CDN URLs.Default:
'https://ucarecdn.com'Set CNAME base domain for prefixed CDN URLs.Default:
'https://ucarecd.net'Upload Configuration
Set a custom upload URL.Default:
'https://upload.uploadcare.com'Set a custom social sources URL.Default:
'https://social.uploadcare.com'Maximum number of concurrent upload requests.Default:
10Maximum number of retry attempts for throttled requests.Default:
3Maximum number of retry attempts for network errors.Default:
3Check for URL duplicates before uploading.Default:
falseSave URL for recurrent uploads to avoid re-uploading the same file.Default:
falseMultipart Uploads
Minimum file size in bytes for multipart uploads. Files larger than this will be uploaded in chunks.Default:
26214400 (25 MB)Chunk size for multipart uploads in bytes.Default:
5242880 (5 MB)Maximum number of concurrent requests for multipart uploads.Default:
4Maximum number of attempts for multipart upload chunks.Default:
3Security
Secure signature for uploads. Used for signed uploads to prevent unauthorized file uploads.Default:
''See Signed Uploads for more details.Expiry time for secure uploads. Unix timestamp as a string.Default:
''Expiry threshold for secure uploads in milliseconds. When the signature is about to expire within this threshold, the resolver will be called again.Default:
600000 (10 minutes)Resolver function for secure uploads signature. Returns a promise that resolves to an object containing
secureSignature and secureExpire.Default: nullThis is a complex type that must be set via JavaScript, not as an HTML attribute.
Proxy URL for secure delivery.Default:
''Resolver function for secure delivery proxy URL.Default:
nullThis is a complex type that must be set via JavaScript, not as an HTML attribute.
Image Processing
Defines the crop behavior. When uploading images, your users can select a crop area with a defined aspect ratio.Default:
''Examples: '1:1', '16:9', 'free'Image shrink options. Automatically resize images before upload.Default:
''Example: '1024x1024' to resize images larger than 1024x1024 pixels.Use local image editor for basic image editing operations.Default:
falseEnable cloud image editing with advanced features.Default:
trueTabs to show in the cloud image editor. Comma-separated list.Default:
'crop, tuning, filters'Available tabs:crop- Crop and rotatetuning- Brightness, contrast, saturation, etc.filters- Apply filtersblur- Blur effectssharp- Sharpenenhance- Auto-enhance
Automatically open the cloud image editor after selecting an image.Default:
falseURL to a mask image for the cloud image editor.Default:
nullEnable quality insights for uploaded images. Shows warnings about image quality issues.Default:
trueRemove copyright information from images.Default:
falseUI Configuration
Thumbnail size in pixels.Default:
76Show the upload list even if it is empty.Default:
falseDisplay mode for the files list.Default:
'list''list'- Show files in a list view'grid'- Show files in a grid view
Show file names in grid view mode.Default:
falseLock scroll when modal is open. Prevents scrolling of the page behind the modal.Default:
trueShow animated strokes on modal backdrop for a more engaging appearance.Default:
falseLocalization
Locale name for the uploader. Determines the language of the UI.Default:
'en'Supported locales:'en'- English'ar'- Arabic'az'- Azerbaijani'ca'- Catalan'cs'- Czech'da'- Danish'de'- German'el'- Greek'es'- Spanish'et'- Estonian'fr'- French'he'- Hebrew'it'- Italian'ja'- Japanese'ko'- Korean'lv'- Latvian'nb'- Norwegian Bokmål'nl'- Dutch'pl'- Polish'pt'- Portuguese'ro'- Romanian'ru'- Russian'sk'- Slovak'sr'- Serbian'sv'- Swedish'tr'- Turkish'uk'- Ukrainian'vi'- Vietnamese'zh'- Chinese'zh-TW'- Chinese (Taiwan)
Override locale definitions. Allows customizing translation strings.Default:
nullThis is a complex type that must be set via JavaScript, not as an HTML attribute.
Metadata
Metadata for uploaded files. Can be a static object or a callback function that returns metadata for each file.Default:
nullThis is a complex type that must be set via JavaScript, not as an HTML attribute.
Advanced Configuration
Resolver function for icon href. Allows customizing icon URLs.Default:
nullThis is a complex type that must be set via JavaScript, not as an HTML attribute.
User agent integration string. Used to identify the integration in analytics.Default:
''Define the clipboard paste scope.Default:
'local''local'- Paste is only active when the uploader is focused'global'- Paste is active anywhere on the pagefalse- Paste is disabled
Adds data-testid attributes to each block. Needed for testing purposes.Default:
falseEnable debug mode. Outputs detailed logs to the console.Default:
falseConfiguration Methods
Setting Options via HTML Attributes
Simple configuration options can be set directly as HTML attributes. Use kebab-case for attribute names:Setting Options via JavaScript
Complex options (objects, functions, arrays) must be set via JavaScript:Setting Options in Frameworks
- React
- Vue
- Angular
Type Definitions
FileValidator
CollectionValidator
MetadataCallback
SecureUploadsSignatureResolver
SecureDeliveryProxyUrlResolver
IconHrefResolver
LocaleDefinitionOverride
Best Practices
Use Auto Store for Production
Use Auto Store for Production
Set
store to 'auto' to use your project’s default storage setting. This makes it easier to manage storage behavior across different environments.Validate Files Early
Validate Files Early
Use
fileValidators to validate files before they’re uploaded. This provides immediate feedback to users and reduces unnecessary upload traffic.Use Secure Uploads for Sensitive Applications
Use Secure Uploads for Sensitive Applications
Implement secure uploads using
secureUploadsSignatureResolver to prevent unauthorized file uploads.Optimize Multipart Upload Settings
Optimize Multipart Upload Settings
Adjust multipart upload settings based on your users’ typical connection speeds. For users with slower connections, consider using smaller chunk sizes.
Customize Source List
Customize Source List
Only include the upload sources that your users actually need. This simplifies the UI and improves the user experience.
Add Metadata for Organization
Add Metadata for Organization
Use the
metadata option to attach custom data to uploaded files. This helps with organizing and tracking files in your application.