Element | Type | Required | Description |
Cache-Control | String | No | The caching behavior of the web page when the object is downloaded. For more information, see RFC 2616. By default, this element is left empty. |
Content-Disposition | String | No | The name of the object when the object is downloaded. For more information, see RFC 2616. By default, this element is left empty. |
Content-Encoding | String | No | The content encoding format of the object when the object is downloaded. For more information, see RFC 2616. By default, this element is left empty. |
Expires | String | No | The time when the cached data expires. For more information, see RFC 2616. By default, this element is left empty. |
policy | String | Conditional | The validity of the form fields in the request. A request that does not contain the policy form field is considered as an anonymous request and can be used only to access buckets whose ACLs are public-read-write. By default, this element is left empty. Condition: This form field is required if the bucket ACL is not public-read-write or the OSSAccessKeyId or Signature form field is specified in the request. Important The form and the policy form field must be UTF-8-encoded. The policy form field must also be Base64-encoded. |
x-oss-server-side-encryption-key-id | String | No | The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). You can configure this element only when the x-oss-server-side-encryption element is set to KMS. |
x-oss-content-type | String | No | You can add the x-oss-content-type form field to the body of a PostObject request to specify the content type of the object that you want to upload. The content type specified by the x-oss-content-type form field takes precedence over the content type specified by the file form field that is automatically generated by browsers. The content types are prioritized in the following order: x-oss-content-type form field > Content-Type specified in the file form field that is automatically generated by browsers. By default, this element is left empty. |
x-oss-forbid-overwrite | String | No | Specifies whether the PostObject operation overwrites an existing object that has the same name. When versioning is enabled or suspended for the bucket to which you want to upload the object, x-oss-forbid-overwrite does not take effect. In this case, the object that is uploaded by calling the PostObject operation overwrites the existing object that has the same name. If x-oss-forbid-overwrite is not specified or x-oss-forbid-overwrite is set to false, the object uploaded by calling the PostObject operation overwrites the existing object that has the same name. If x-oss-forbid-overwrite is set to true, the object uploaded by calling the PostObject operation does not overwrite the existing object that has the same name.
If you specify x-oss-forbid-overwrite, the queries per second (QPS) performance of OSS may be degraded. If you want to use x-oss-forbid-overwrite to perform a large number of operations (QPS greater than 1,000), contact technical support. |
x-oss-object-acl | String | No | The ACL of the object that you want to upload. You can specify the ACL of the object that you want to upload in the form field. Valid values: default: The ACL of the object is the same as that of the bucket in which the object is stored. This is the default value. private: The ACL of the object is private. Only the owner of the object and authorized users have the read and write permissions on the object. public-read: The ACL of the object is public-read. Only the owner of the object and authorized users have the read and write permissions on the object. Other users have only the read permissions on the object. Exercise caution when you set the ACL of the object to this value. public-read-write: The ACL of the object is public-read-write. All users have the read and write permissions on the object. Exercise caution when you set the ACL of the object to this value.
For more information, see Object ACLs. |
x-oss-storage-class | String | No | The storage class of the object. If you specify the x-oss-storage-class header when you upload an object, the storage class of the uploaded object is the specified value regardless of the storage class of the bucket to which the object is uploaded. For example, if you set the x-oss-storage-class header to Standard when you upload an object to an Infrequent Access (IA) bucket, the object is stored as a Standard object. Valid values: Standard IA Archive ColdArchive DeepColdArchive Important If you want to upload a large number of objects and set the storage classes of the objects to Deep Cold Archive, you are charged high PUT request fees. We recommend that you set the storage classes of the objects to Standard when you upload the objects, and configure lifecycle rules to convert the storage classes of the Standard objects to Deep Cold Archive. This reduces PUT request fees.
For more information, see Overview. |
key | String | Yes | The name of the object that you want to upload. You do not need to encode the object name. If the object name contains a path, such as destfolder/example.jpg , OSS creates the corresponding directory. By default, this element is left empty. |
success_action_redirect | String | No | The URL to which the client is redirected after the object is uploaded. If this form field is not specified, the returned result is specified by the success_action_status form field. If the upload fails, OSS returns an error code, and the client is not redirected to the URL. By default, this element is left empty. |
success_action_status | String | No | The HTTP status code that is returned to the client when the success_action_redirect form field is not specified and the object is uploaded. Valid values: 200, 201, and 204 (default). If this form field is set to 200 or 204, OSS returns an empty file and HTTP status code 200 or 204. If this form field is set to 201, OSS returns an XML file and HTTP status code 201. If this form field is not specified or set to an invalid value, OSS returns an empty file and HTTP status code 204.
|
x-oss-meta-* | String | No | The user metadata of the object. By default, this element is left empty. If the request contains a form field whose name contains the x-oss-meta- prefix, the form field is considered as the user metadata of the object. Example: x-oss-meta-location . Note An object can have multiple form fields whose names contain the x-oss-meta- prefix. However, the total size of all user metadata of the object cannot exceed 8 KB. |
x-oss-security-token | String | No | The security token that is obtained from STS. This parameter is required only when you use a security token to construct a signature for the URL. You can call the AssumeRole operation of STS to obtain a security token. By default, this element is left empty. |
file | String | Yes | The file or text content. You do not need to encode the content. Browsers automatically add the Content-Type form field based on the file type and overwrite the content type specified in the Content-Type header. You can upload only one object by using a PostObject request. By default, this element is left empty. Important The last form field must be file. |