Upload one part
const url = 'https://api.engram.page/attachment-uploads/example/parts/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.engram.page/attachment-uploads/example/parts/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/octet-stream' \ --data binaryStores part n (1-based) as raw application/octet-stream bytes. Every part is exactly part_size bytes except the last, which is the remainder; any other size returns 422 bad_part_size and a part number outside the session returns 422 bad_part_number. Re-sending a part replaces it. A body that stalls returns 408. A session that already completed returns 409 upload_completed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Upload id
Part number, from 1
Request Bodyrequired
Section titled “Request Bodyrequired”Part bytes
Responses
Section titled “Responses”Part stored
object
Example generated
{ "part": 1}No such upload
Body stalled before it finished
object
Stable machine-readable reason, where one is defined.
Example
{ "code": "blob_missing", "error": "not found"}upload_completed: the session already completed
Bad part number or size
Storage backend failure
object
Stable machine-readable reason, where one is defined.
Example
{ "code": "blob_missing", "error": "not found"}rotation_in_progress: an encryption key rotation holds the account; retry after retry-after seconds.
object
Stable machine-readable reason, where one is defined.
Example
{ "code": "blob_missing", "error": "not found"}