Network and performance options
Options that tune endpoints, retries, multipart uploads, and request concurrency. The defaults suit most projects.
See all options for the full list.
cdnCname
Set Custom CNAME. See Custom CNAME docs for details.
If you do not set this option, the CDN CNAME will be determined automatically based on your public key. You usually don’t need to configure it manually unless you have a custom CDN domain.
Attribute: cdn-cname
DOM property: cdnCname
Type: string
Default: 'https://:subdomain.ucarecd.net'
Actual value depends on your account settings.
New accounts use dedicated subdomains on *.ucarecd.net, while older ones may still use ucarecdn.com.
baseUrl
Set a custom upload URL.
Attribute: base-url
DOM property: baseUrl
Type: string
Default: 'https://upload.uploadcare.com'
maxConcurrentRequests
Controls the maximum number of files that can be uploaded simultaneously across the entire uploader instance.
This setting helps manage system resources and prevents overwhelming the user’s network connection. Files exceeding this limit will be queued and processed once active uploads complete.
Performance consideration: Higher values increase upload speed but consume more bandwidth and system resources. Lower values reduce resource usage but may slow overall upload throughput.
Example: With maxConcurrentRequests: 10, if a user selects 20 files, only 10 will upload simultaneously while the remaining 10 wait in the queue.
Attribute: max-concurrent-requests
DOM property: maxConcurrentRequests
Type: number
Default: 10
retryThrottledRequestMaxTimes
Maximum number of retry attempts for throttled requests.
Attribute: retry-throttled-request-max-times
DOM property: retryThrottledRequestMaxTimes
Type: number
Default: 3
retryNetworkErrorMaxTimes Since v1.18.0
Maximum number of retry attempts for requests that failed due to network errors.
Attribute: retry-network-error-max-times
DOM property: retryNetworkErrorMaxTimes
Type: number
Default: 3
multipartMinFileSize
Sets the file size threshold (in bytes) that triggers multipart upload mode instead of direct upload.
Upload methods:
- Direct upload: Files smaller than this threshold are uploaded in a single request
- Multipart upload: Files larger than this threshold are split into chunks and uploaded piece by piece
Why this matters:
- Multipart uploads are more reliable and faster for large files
- Direct uploads are faster for small files
Attribute: multipart-min-file-size
DOM property: multipartMinFileSize
Type: number
Default: 26214400 (25 MB)
multipartChunkSize
Defines the size (in bytes) of each chunk when uploading large files via multipart upload.
How it works: Large files are divided into smaller, manageable pieces of this size. Each chunk is uploaded independently, allowing for better error handling and speed.
Tuning considerations:
- Larger chunks: Fewer network requests, faster uploads
- Smaller chunks: More granular progress updates, better for unstable connections, but more network overhead
Attribute: multipart-chunk-size
DOM property: multipartChunkSize
Type: number
Default: 5242880 (5 MB)
multipartMaxConcurrentRequests
Controls how many chunks can be uploaded simultaneously for each individual multipart upload.
When uploading large files (>25MB), they are split into smaller chunks. This setting limits how many of those chunks can be uploaded in parallel for each file.
Example: If set to 4, only 4 chunks of a single multipart upload will be processed simultaneously, while remaining chunks wait in the queue.
Attribute: multipart-max-concurrent-requests
DOM property: multipartMaxConcurrentRequests
Type: number
Default: 4
multipartMaxAttempts Deprecated
Failed multipart upload chunks are retried by the same rules as other upload
requests: retryThrottledRequestMaxTimes
for throttled requests and
retryNetworkErrorMaxTimes for network
errors. Use those options to tune chunk retries.
Attribute: multipart-max-attempts
DOM property: multipartMaxAttempts
Type: number
Default: 3