S3 add an object to a bucket

Adds an object to a bucket. You must have write permissions on the bucket to perform this operation.

Syntax

PUT /_BUCKET_/_OBJECT_ HTTP/1.1

Request Headers

content-md5

Description

A base64 encoded MD-5 hash of the message.

Valid Values

A string. No defaults or constraints.

Required

No

content-type

Description

A standard MIME type.

Valid Values

Any MIME type. Default: binary/octet-stream.

Required

No

x-amz-meta-<...>*

Description

User metadata. Stored with the object.

Valid Values

A string up to 8kb. No defaults.

Required

No

x-amz-acl

Description

A canned ACL.

Valid Values

private, public-read, public-read-write, authenticated-read

Required

No

if-match

Description

Uploads the object only if the current object’s ETag matches the specified ETag value. If the ETag does not match, the request fails with HTTP 412 (Precondition Failed). If multiple requests attempt to modify the same object concurrently, the server can return HTTP 409 (Conflict).

Valid Values

Entity Tag (ETag)

Required

No

if-none-match
Uploads the object only if the specified ETag does not match the current object’s ETag. If the ETag matches, the request fails with HTTP 412 (Precondition Failed).
Valid Values
Entity Tag (ETag)
Required
No

Response Headers

x-amz-version-id

Description

Returns the version ID or null.

Note: Conditional headers are not supported for multipart upload initialization requests.