Upload raw file bytes to Google Drive (streaming, phase 2)
Phase 2 of the streaming upload flow. The caller PUTs raw bytes to this endpoint after
initializing a streaming upload via POST /google-drive/v1/sync/upload-raw-file with
X-Upload-Mode: STREAM.
The {streamId} path segment and X-Stream-Token header value both come from the
phase-1 response (uploadUrl already embeds the streamId; X-Stream-Token is the
streamToken field). The token is single-use and expires at expiresAt. The body must
be the raw file bytes; total size must not exceed the maxBytes returned by phase 1.
On success, the endpoint returns 204 No Content.
Authorizations
IDM-issued JWT. Obtain via the IDM authentication flow and pass as: Bearer
Headers
Required on the phase-2 PUT of a streaming upload (X-Upload-Mode: STREAM). The value is the streamToken returned by the phase-1 initialize call. Mismatched or expired tokens are rejected with 401.
MIME type of the bytes being uploaded. Defaults to application/octet-stream if omitted; set this to the file's true content type when known.
Size of the uploaded payload in bytes. Must not exceed maxBytes from phase 1.
Path Parameters
Stream identifier from the phase-1 response. Embedded in the uploadUrl returned by POST /sync/upload-raw-file with X-Upload-Mode: STREAM.
Body
Raw bytes of the file to upload. The body is streamed unmodified to Google Drive.
The body is of type file.
Response
Success — bytes accepted and forwarded to Google Drive.