PutObject

Last update:2025-08-18 15:51:52

Upload the complete file to the bucket in a single request.

  1. If there is already a file with the same name in the specified bucket, the newly uploaded file will overwrite the original file.
  2. Users need to have wos:putObject permissions.

Request syntax

PUT /Key+ HTTP/1.1
Host: Bucket.Endpoint
Cache-Control: CacheControl
Content-Disposition: ContentDisposition
Content-Encoding: ContentEncoding
Content-Language: ContentLanguage
Content-Length: ContentLength
Content-MD5: ContentMD5
Content-Type: ContentType
Expires: Expires
x-wos-storage-class: StorageClass

Body

URI request parameters

no

Request header

In addition to Common Request Headers, it also supports

Parameter Description Required
Content-MD5 The MD5 value of the object data to be uploaded. If the data is corrupted during transmission, a 403 SignatureDoesNotMatch error will be returned, indicating that the MD5 does not match the original value, and the upload will fail. No
x-wos-storage-class Specifies the storage class of the file. Supported values include: Standard (standard storage), IA (infrequent access storage), and Archive (archive storage). Defaults to the bucket’s storage class. No
x-wos-meta-* Custom metadata. This information will be returned as response headers when using headObject and getObject operations. No

Request body

Object Body

Response syntax

HTTP/1 status_code

x-wos-request-id: request id

Date: date

Content-Length: length

Content-Type: type

Server: WS-web-server

Response header

In addition to Common Response Headers, it also contains

Element name

description

Etag

Entity tag of uploaded data

Response body

None

Example

PUT /object02 HTTP/1.1
Host: bucket.s3-cn-east-1.wcsapi.com
Accept: */*
Date: Sat, 03 Dec 2011 07:12:31 +0000
Authorization: AWS BF6C09F302931425E9A7:KUxrlwKGWYpUOTgwNxIHALsRdT4=
Content-Length


HTTP/1 200 OK
x-wos-request-id: 001B21A61C6C0000013402C4616D5285
Content-Type: text/xml
Etag: "33bee59f4c1f859a7aedd36779b321cf"
Date: Sat, 03 Dec 2011 07:12:31 GMT
Content-Length: 0
Server:WS-web-server


Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!