upload method
Written by
Updated at March 19, 2025
Uploads a CORS configuration for a bucket. It replaces any existing configuration.
A CORS configuration is an XML file up to 64 KB. A configuration may not contain more than 100 rules.
For more information on getting started with the API and the general request format, see How to use the S3 API.
Request
PUT /{bucket}?cors HTTP/2
Path parameters
Parameter | Description |
---|---|
bucket |
Bucket name. |
Request parameters
Parameter | Description |
---|---|
cors |
Required parameter that indicates the type of operation. |
Headers
Use the appropriate common headers in your request.
The Content-MD5
header is required.
Data schema
A CORS configuration is provided as an XML document. For the schema description, see CORS configuration for buckets
Response
Headers
Responses can only contain common headers.
Response codes
For a list of possible responses, see Responses.