PutObject

Last update:2023-09-26 18:28:54

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 buket, 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 Headers, it also supports

Parameter Description Required
Content-MD5 The MD5 of object data to upload, if the data is damaged during transmission, than response 403 SignatureDoesNotMatch will be returned to notice you that the MD5 is inconsistent with the orgin. No
x-wos-meta-* Customized metadata, which will be returned as it is in headObject and getObject. 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 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!