PutObject

최신 업데이트: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


이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.