Expand description
Types shared by resumable upload clients and servers.
A resumable upload writes one object across multiple requests. The client first creates a
session, declaring the object’s complete size with HEADER_UPLOAD_LENGTH. The server returns
a CreateSessionResponse containing an opaque SessionToken that identifies the upload.
The client then sends chunks with HEADER_UPLOAD_OFFSET set to the byte position at which
each chunk starts. If an upload is interrupted, the client can send the wildcard offset
UploadOffset::Unknown to query the server’s authoritative position before resuming. The
request that completes the upload returns a CompleteUploadResponse.
Session tokens contain the canonical object path and backend state protected by the storage
service, and clients must treat their contents as opaque. The token bytes are encoded as
unpadded base64url when the token is placed in a request’s session query parameter.
Structs§
- Complete
Upload Response - Response from the request that completes the upload.
- Create
Session Response - Response from creating a resumable upload session.
- Invalid
Session Token - Error returned for a non-canonical or malformed external session token.
- Invalid
Upload Offset - Error returned when an
UploadOffsetheader value cannot be parsed. - Session
Token - Identifier for an in-progress resumable upload session.
Enums§
- Upload
Offset - The value of the
HEADER_UPLOAD_OFFSETrequest header. - Upload
Progress - How far a resumable upload has progressed.
Constants§
- HEADER_
UPLOAD_ LENGTH - Request header declaring the total size of the object, in bytes.
- HEADER_
UPLOAD_ OFFSET - Header carrying the byte offset of a chunk, or the offset the server holds.