OSS supports objects from 0 bytes to 48.8 TB. For objects larger than 5 GB, simple upload, form upload, and append upload are not supported. Use multipart upload, resumable upload, ossbrowser, or ossutil instead.
Upload methods
OSS supports objects from 0 bytes to 48.8 TB. Alternative upload methods are useful in the following scenarios:
The object is larger than 5 GB. The OSS console, simple upload, form upload, and append upload do not support objects above this limit.
The object is smaller than 5 GB, but intermittent timeouts or connection drops occur due to poor network performance.
Choose an upload method
|
Scenario |
Recommended method |
|
Object > 5 GB |
Multipart upload, resumable upload, ossutil, or ossbrowser |
|
Object < 5 GB with frequent timeouts or interruptions |
Resumable upload |
|
Large-scale batch uploads |
ossutil (small batches) or ossutil + ossimport (large batches) |
|
Streaming upload with unknown object size |
Multipart upload |
Method 1: Multipart upload or resumable upload
Multipart upload and resumable upload are well suited for:
Objects larger than 5 GB: PutObject does not support objects above this limit.
Streaming uploads: Start uploading before the final object size is known — for example, in cloud video recording or video surveillance applications.
Unreliable networks: Resumable upload retries only the failed parts, not the entire object. This is especially efficient when uploads are frequently interrupted.
Parallel upload acceleration: Split a large object into parts and upload them concurrently to maximize throughput.
For more information, see Multipart upload and Resumable upload.
Method 2: ossbrowser
ossbrowser uses multipart upload and resumable upload by default, supporting objects up to 48.8 TB. Keep the following in mind:
Log on with a Security Token Service (STS) token, or use the AccessKey pair of a RAM user.
To use the simple policy feature, log on with the AccessKey pair of a RAM user who has RAM configuration permissions.
When many uploads or downloads run simultaneously, reduce the concurrency limit to improve the speed of a specific task.
The maximum supported object size is 48.8 TB.
For more information, see Common operations.
Method 3: ossutil
Use the cp command to upload large objects. ossutil provides fine-grained control over resumable upload and concurrency:
Use the
cpcommand to upload large objects.Set
--bigfile-thresholdto define the object size above which resumable upload is used automatically.Set
-jobsand-parallelto control the number of concurrent upload tasks when uploading one or more large objects.For batch uploads of many objects, use ossutil together with ossimport.
For smaller batches, ossutil alone is sufficient.
For more information, see cp (upload files).
Troubleshooting
-
PutObject fails when uploading large objects. Common causes:
The object exceeds 5 GB. PutObject does not support objects larger than 5 GB. Use ossutil to upload the object in parts.
-
PutObject times out with no response. A large maximum transmission unit (MTU) value can cause this. Run
netstat -ion the Elastic Compute Service (ECS) instance to check the current MTU. The default MTU for internal and external network interface cards is 1500.
Lower the MTU. For example, run
ip link set dev eth0 mtu 1470on Linux to set the MTU for eth0 to 1470.Switch to the MultipartUpload operation or ossutil.
-
A large object cannot be uploaded in parts concurrently. To enable concurrent part uploads:
With ossutil: specify
--bigfile-threshold,-jobs, and-parallelto control concurrency.With OSS APIs or SDKs: use the MultipartUpload operation and write concurrent upload logic. Many SDKs expose a concurrency parameter — for example, taskNum in OSS SDK for Java and num_threads in OSS SDK for Python.