The upload pipeline

This page follows an upload through the pipeline behind the DataMind Oda web interface: the streaming intake that receives it, the upload service that stores it, and the store of staged receipts that holds it until your message. For the upload as you meet it in the composer, see File uploads in the web app; for the part after the upload, see Upload receipts.

The streaming intake

The upload service

Staged receipts

The full life of a receipt, from staging to retirement, is in Upload receipts.

Questions, answered

What are the stages an upload goes through?

Three. A streaming intake receives the bytes, checking up front that the upload arrives as raw bytes and names its chat; the upload service stores the file and sorts any failure; and the result is staged as a receipt for that chat until your message carries it. The journey as you meet it is in File uploads in the web app.

Why is an upload not counted against the request size limit?

Because the intake streams the file instead of reading it whole first. A streamed upload is not counted against the size limit for buffered requests; that limit and its default are in Connection settings and defaults.

Where does the file's name come from?

From the upload's address, as a query value sent with it, not from the body: the body carries only the file's bytes. The stored name is a cleaned version of the name you gave, described in File uploads in the web app.

Does the chat have to be open when I upload?

No. If the chat is not currently open, the pipeline resolves it through its agent before storing the file, so an upload can reach a chat that is not running at the moment. An upload for a chat that cannot be resolved fails instead, with the message in Connection and upload messages.

What happens if Oda cannot store the file?

The upload fails instead of staging a receipt. A failure the service understands comes back with its own message, and anything else comes back as an internal failure starting with failed to store file upload:. What each message means, and what to do, is in Connection and upload messages.

Can a file arrive by another path?

Yes. A caller that already holds a file as bytes can send it through a call, base64-encoded, instead of streaming it; Remote calls, streams and events describes the call layer.

What does the upload get back when it finishes?

A short JSON answer with status 200, holding the staged receipt, marked no-store so it is not cached. The receipt is what binds the file to your message when you send it; Upload receipts follows it from there.

Where is a staged upload kept until I send it?

With the chat itself. Staged receipts are held per chat, a receipt is found only through its own chat, and they go with the chat when it is gone. What retires a receipt is in Upload receipts.