All Products
Search
Document Center

Object Storage Service:0006-00000003

Last Updated:Apr 14, 2025

Problem description

When you call the PostObject operation to upload an object, the size of the object exceeds the upper limit.

Causes

  • The object that you upload is larger than 5 GB in size. An object that you upload by calling the PostObject operation cannot be larger than 5 GB in size.

  • The object that you upload exceeds the limits specified by the content-length-range condition. The value of the policy form field is a JSON string that is encoded in UTF-8 and Base64. This value declares the conditions that a PostObject request must meet. The value of the conditions parameter is a list that specifies the valid values of the form fields in the PostObject request. The content-length-range condition is used to specify the maximum and minimum sizes of an uploaded object. The unit of the value is bytes. If the object that you upload is not within the size range specified by the field, an error is returned.

Examples

The following code provides an example. In this example, the big.img object exceeds 5 GB in size.

POST / HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6443500495
Date: Sat, 18 Feb 2023 05:17:02 GMT
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryW0DET1iaBMeAOBg3
Host: example-bucket.oss-cn-hangzhou.aliyuncs.com
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="name"
big.img
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="key"
${filename}
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="policy"
eyJleHBpcmF0aW9uIjoiMjAyMy0wMi0xOFQxMzoxOTowMC4wMDBaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA0ODU3NjAwMF1dfQ==
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="OSSAccessKeyId"
LTAI****************
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="success_action_status"
200
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="signature"
miAo****************
------WebKitFormBoundaryW0DET1iaBMeAOBg3
Content-Disposition: form-data; name="file"; filename="big.img"
Content-Type: application/octet-stream
***
------WebKitFormBoundaryW0DET1iaBMeAOBg3--

Solutions

  • Make sure that the object that you want to upload does not exceed 5 GB in size.

  • If the content-length-range condition exists in the policy form field, make sure that the size of the object that you want to upload is in the valid range.

References