Skip to content
LogoLogo

Complete a reserved upload

Complete a reserved upload

POST/api/v1/attachment-uploads/{upload_id}/complete

Verifies the uploaded object, streams it through the private malware scanner, and converts reserved bytes into stored bytes. Completion checks object existence, the exact observed size, the expected object key, and the SHA-256 digest, and decides the content type from the object's leading bytes — never from the client-declared type, which is advisory and is discarded.

Detection and the filename extension are independent grounds for denial: an object whose detected type is on the execution-risk denylist is rejected whatever it is named, and a denied extension is rejected whatever the bytes contain. Neither can permit what the other rejects. SVG is retained as a download-only attachment: it is never eligible for inline display. Scanner failures fail completion closed. A detected malicious attachment is retained only in private quarantine with scan_state: quarantined; it cannot be linked, previewed, or downloaded.

Path Parameters

upload_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-Token
string·min 1·max 200

Required when this operation uses browserSession; native bearer callers omit it because no ambient cookie is sent.

Request Body

application/json
sha256
string

Lowercase hexadecimal SHA-256 digest.

Responses