API Reference
/- Cloud Storage
- Local API
- Confirm Upload Completion
Page Cloud Storage Files
Batch Request Presigned Upload URLs
Batch Delete Cloud Storage Files
Confirm Upload Completion
Confirm an uploaded Cloud Storage file.
- Preconditions: the file record must belong to your team and the object must already be in storage — the service reads its ETag and length to verify. Size must be greater than 0 and under 2 GB.
- Effect: charges the team's storage quota atomically, then marks the record uploaded and stores the real size. Until this succeeds the file does not appear in
/cloudstorage/file/pageand keeps occupying one of the 100 pending slots. - On failure the uploaded object is deleted. Calling this too early, over the size limit, or with no space left removes the bytes from storage and leaves the record unconfirmed. Recovery is a fresh
/cloudstorage/upload/initand a re-upload, not a retry of this call. - Completion: synchronous and idempotent once it has succeeded — a second call returns the same file without charging quota again.
- Note: a record that is never confirmed is cleaned up automatically after 24 hours.
Documented business errors: 39001, 39011, 39014, 39041, 39046, 39047. See Error Codes for what each code means. Any operation can additionally return the common codes.
POST
curl -i -X POST \
http://127.0.0.1:40000/api/cloudstorage/upload/complete \
-H 'Content-Type: application/json' \
-d '{
"id": "1800000000000001"
}'Success
Operation request ID. This field may be present when the request passes through the API gateway.
Example:"1d4f3ea968664593860b94b35d4ebf5e"
Response
{ "code": 0, "msg": null, "requestId": "1d4f3ea968664593860b94b35d4ebf5e", "data": { "id": "1800000000001001", "fileName": "example", "fileExt": "jpg", "fileSize": "204800", "fileType": 0, "tagInfo": [ … ], "createDate": "string", "updateDate": "string" } }