latestSwagger 2.0Proprietary2026-08-17126191431.8 KB

7f97d8cd0f1e

storage

Prepare upload

Returns the key an upload should use for the given file — unchanged when free, numerically suffixed ("a.pdf" → "a (2).pdf") when the name is already taken — plus a V4 signed PUT URL for exactly that key. PUT the file body to upload_url sending upload_headers verbatim: they carry an if-generation-match precondition (412 if the object appeared meanwhile — re-resolve and retry) and a content-length-range that GCS enforces on the actual received bytes (400 when over max_size_bytes). Called once per file right before its upload. Refused with 409 inside folders synced from an external data source.

post/storage/prepare-upload

Request body

business_node_idstring
keystring
md5string
pathstring

Response

OK

already_existsboolean
keystring
max_size_bytesinteger
upload_headersobject
upload_urlstring