Uploads
Send a file, and follow DOCX conversion.
Prepare
POST /api/v1/uploads with name and size (exact bytes, at least 1). lastModified (Unix milliseconds), author and language are optional. The content type comes from the extension.
Send the file
PUT the raw file to the returned url, with every returned header. The URL may be a signed storage URL or a same-origin proxy URL. Prepare another upload if expiresAt has passed.
Add it to the library
{ "source": { "type": "upload", "uploadId": "..." } }Expiry and limits
- Pending uploads expire after 24 hours. Signed transfer URLs expire after five minutes; proxy URLs last as long as the pending upload.
- The file must match its declared length and the instance's maximum upload size, and its bytes are verified before registration.
- Storage transport and CORS are described in Object storage.
DOCX
The compute worker converts DOCX to PDF. Without a worker, the request returns 503 COMPUTE_WORKER_REQUIRED.
Until conversion finishes, creation returns 202 with an upload resource rather than a document.
- Read progress from
statusUrl, or follow SSE snapshots ateventsUrl. - Read
statusUrlonce conversion completes. That read verifies and registers the PDF and returns it asdocument.
Conversion continues with the tab closed, but registration still needs the status read. A failed upload includes an error message.
| Upload status | Meaning |
|---|---|
pending | Waiting for the file |
processing | Converting |
ready | The file is registered. The PDF itself may still be not_started or processing. |
failed | error explains why |
A compute limit or worker outage does not fail registration; the document parses later. A converted DOCX's file URL serves the PDF.