Problem description
The x-oss-storage-class header cannot be left blank.
Causes
The x-oss-storage-class header was included in the request but set to an empty string.
Examples
The following example shows a valid PutObject request with x-oss-storage-class set to a non-empty value:
PUT /ObjectName HTTP/1.1
Content-Length: ContentLength
Content-Type: ContentType
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
x-oss-storage-class: Archive
Authorization: SignatureValueSolutions
Set x-oss-storage-class to one of the following valid values:
Valid values: Standard | IA | Archive | ColdArchive | DeepColdArchive
| Value | Storage class |
|---|---|
Standard | Standard |
IA | Infrequent Access (IA) |
Archive | Archive |
ColdArchive | Cold Archive |
DeepColdArchive | Deep Cold Archive |
The x-oss-storage-class header overrides the bucket's storage class for the specific object being uploaded. For example, if you set x-oss-storage-class: Standard when uploading to an Infrequent Access bucket, the object is stored as Standard, not Infrequent Access.