Uploading files

Confirm an upload

Record the uploaded version. The server HEADs the object to prove it landed, then inserts the version row and advances the file's tip. Pass the `storageKey` you were given at initiate; for a deduped file omit it and send `dedup: true` instead. A 409 with `versionConflict` means another upload took that version — re-initiate to get a fresh one. A confirmed version is not visible to your team until you reference it in a commit.

POST/api/v1/projects/{projectId}/files/upload/confirm

Request

Body
json
{
  "fileId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "version": 12,
  "storageKey": "1b9d6bcd/7c9e6679/f47ac10b/12/a1b2c3_MainLevel.umap",
  "sha256": "a1b2c3...",
  "size": 524288000
}

Response

200 OK
json
{
  "confirmed": true,
  "version": 12
}

Examples

curlbash
curl -X POST https://usourcecontrol.com/api/v1/projects/7c9e6679-7425-40de-944b-e07fc1f90ae7/files/upload/confirm \
  -H "Authorization: Bearer usc_your_project_key" \
  -H "Content-Type: application/json" \
  -d '{
    "fileId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "version": 12,
    "storageKey": "1b9d6bcd/7c9e6679/f47ac10b/12/a1b2c3_MainLevel.umap",
    "sha256": "a1b2c3...",
    "size": 524288000
  }'

Try it

Try itChanges data
POST/api/v1/projects/{projectId}/files/upload/confirm

Kept in this tab only, sent straight to the API, and never to our servers. Create one in your project’s settings.

This is a POST request against the live API. It will really run, on the real project the key belongs to.

Was this helpful?

Back to top