Problem description
When you call the PostObject operation, small objects upload successfully, but objects exceeding a certain size fail to be uploaded.
Cause
Your PostObject policy includes a content-length-range condition that restricts the size of uploaded objects. When the object size exceeds the configured maximum, OSS rejects the upload.
The condition uses this format:
["content-length-range", <min-bytes>, <max-bytes>]For example, ["content-length-range", 0, 104857600] limits uploads to objects smaller than 100 MB (104,857,600 bytes).
For the full list of PostObject policy conditions, see PostObject.
Solution
Choose one of the following options based on your situation.
Option 1: Increase the size limit (recommended)
Raise the <max-bytes> value in the content-length-range condition, then retry the upload.
Option 2: Use multipart upload
If you cannot modify the policy, split the object and upload it using multipart upload. See Multipart upload for instructions. For ossutil-based multipart uploads, see the ossutil overview.
If neither option resolves the issue, see How to upload large files to OSS for further troubleshooting.