Register Upload
Changed onFinalize a signed-URL upload into a Moda file row.
Streams the staged blob through download_with_hash (writes to a temp file on disk, hashes in 8 KiB chunks) so a 250 MB upload never fully materializes in process memory — loading even a couple of those concurrently on Cloud Run would risk OOM and defeat the point of the direct-to-storage flow.
Deduplicates against existing team files by content hash. On a dedup miss the staged blob is server-side-copied to the canonical teams/<team>/files/<id> key via storage.copy (zero data transfer on GCS) and registered via create_file_from_storage. The pending blob is best-effort deleted either way.
Request
- Base URLhttps://api.moda.app/v1
- URLhttps://api.moda.app/v1/uploads/register
- AuthHTTP bearer
Headers
Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.
Request body
Example request
{
"folder_id": "fld_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
}Response
Successful Response
Example response
{
"id": "file_01HT9WK8N3M2J4A5Z6P7Q8R9TV",
"folder_id": "fld_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
}Changes
- info
added the new optional request property
- info
added the new optional request property
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info