Start an upload for a document
Mints the key the bytes will go to and records it against the document, then answers with the largest body this endpoint takes so a client can refuse an oversized file before it streams anything. The key is the SHA-256 you declare, so starting the same upload twice is the same key twice and the bytes are written once. Send the file to PUT on this same address afterwards. A file larger than one request (a PDF or office document of up to 104857600 bytes, or a clip) opens an upload in parts instead: upload names the part size and count, the parts go to PUT …/content/parts/{part} in order, and POST …/content/complete closes it, with the declared sha256 being the chain of the parts’ hashes. A document that already holds bytes is not replaced here.
The bytes go to the store in the region of the property the document is filed against, read through a lease, a unit or a tenant to the building, and stay there. A document about no property goes to the account’s own region.
Request
- Base URL: http://localhost:5180
- URL: http://localhost:5180/api/v1/documents/{id}/content
- Auth: API key in cookie better-auth.session_token
Path parameters
Document id, for example doc_014.
Request body
Response
The upload is open, or the bytes were already there.
Changes
No recorded changes to this operation across all 1 revision of this API.