put() picks the right one for you.
Simple upload
Options
These apply to both flows. On the simple upload they are query parameters.Path rules
A path has 1 to 1024 characters and up to 16 segments. Each segment is 1 to 255 characters fromA-Z a-z 0-9 . _ - space, cannot start with . or end with a space. No //, no leading or trailing /, no .., and the file must have an extension. An invalid path fails with VALIDATION_ERROR; the platform never rewrites it silently.
Direct upload
1
Create the upload
Send the path and exact size. The response says whether the upload is
single (one PUT) or multipart, and for multipart gives the fixed part_size and part_count.2
Send the bytes
For
single, PUT the file to the returned url. For multipart, request URLs for up to 100 parts at a time with Get part URLs and PUT each part. Send exactly the headers returned with each URL; they are part of the signature. Parts can go in parallel and the last one may be smaller.3
Complete
Call Complete upload. The platform checks the parts, the total size, the checksum and the file type, then creates the object. A mismatch answers
BLOB_UPLOAD_INCOMPLETE.Resuming
An interrupted direct upload can be resumed until it expires (expires_at on the upload). Get upload returns uploaded_parts; send only what is missing. Abort upload cancels it and frees the reserved quota.
Quota and reservations
When you create an upload the declared size is reserved against your quota. Ifused + reserved + new would exceed the quota the upload is refused with STORAGE_QUOTA_EXCEEDED. Expired or aborted uploads release their reservation. Having too many uploads open at once answers BLOB_UPLOAD_LIMIT. The limit on open uploads and the other limits of your plan are in limits of Get stats.
Size limits
- A simple upload takes files up to 100 MB.
- In a multipart upload each part is 5 MiB to 5 GiB (the last part can be smaller), with at most 10,000 parts.
- An object can be up to 10 GB.
Upload rate
Plans below Enterprise-12 are limited to one upload per second per account; Enterprise-12 and above have no limit of their own beyond platform-wide abuse protection. Exceeding it answersRATE_LIMIT_EXCEEDED with a Retry-After header; wait that long and retry. The exact figure for your plan is limits.uploads_per_second in Get stats.
Common errors
All codes are listed in the error catalog.