Stay organized with collections Save and categorize content based on your preferences.
Use a PUT object request to:
The following are common request headers for PUT object requests.
Header Description RequiredAuthorization
The authentication string for the request. Yes Content-Length
The length of the request body without headers (in bytes). Yes1 Content-Type
2 The MIME type of the request body. If you do not specify a content type, Cloud Storage defaults to application/octet-stream
when it serves the object. No (recommended) Content-MD5
The MD5 digest of the request message without headers. While not required, this header is generally recommended as a data integrity check to verify that the data received by Cloud Storage is the same as the data that was intended to be sent. No Date
The date and time of the request. Yes Host
The URI for Cloud Storage. For more information, see Request Endpoints. Yes Transfer-Encoding
Indicates if the message body was chunked. In requests that use V4 Signatures for their authentication, chunked uploads must also include the header x-amz-decoded-content-length
. No (except for requests that use chunked transfer encoding) x-goog-if-generation-match
2 If the generation you specify is the same as the object you're replacing, then the object is replaced. You can also specify 0 as a special value to indicate that the new object is only created if there is no existing object. No x-goog-if-metageneration-match
2 If the metageneration you specify is the same as the object you're trying to update, then the object metadata is updated. This is only allowed if x-goog-if-generation
is specified. By combining these two generation properties, you can implement safe read-modify-write updates. No x-goog-storage-class
2 Gives an object a storage class besides the default storage class of the associated bucket. No x-goog-user-project
The project to be billed for charges associated with the request. No
1 Not required for requests that use chunked transfer encoding.
2 This header is not applicable in PUT Object
requests that upload an object part.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4