Skip to main content
POST
Initiate File Upload to Cloud Storage

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Information about the file(s) to be uploaded. Can be a single object or an array of objects (max 100).

Single file request: { "filename": "...", "type": "...", "metadata": {...} } Bulk request: [{ "filename": "...", "type": "...", "metadata": {...} }, ...]

A single upload request object, or an array of upload request objects (max 100).

filename
string
required

A file name including file extension.

Example:

"document.xliff"

type
string
required

The content-type or mime-type of the file to upload.

Example:

"video/mp4"

metadata
object

Optional file metadata.

Response

Upload initialization information. Returns a single object for single file requests, or an array of objects for bulk requests.

url
string

Pre-signed URL for file upload

Example:

"https://storage.googleapis.com/bucket/uploads/user123/file456.json?..."

key
string

Upload key identifier

Example:

"uploads/user123/file456.json"

method
string

HTTP method to use for upload

Example:

"PUT"