Loading the documentation…

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 staged receipt that holds it until your message takes it. For the upload as you meet it in the composer, see File uploads in the web app.

The streaming intake

The upload service

Staged receipts

Sending is what takes the file

  1. You send, and the message claims the receipt of every file you picked. Sending therefore waits until each file has finished uploading, as File uploads in the web app describes.
  2. Oda checks the claim as the message is accepted. A message that goes through carries its files with it.
  3. Once your message is in the chat, the receipt has done its job: it is retired, and the file stays with the chat as part of that message.

When a file cannot be attached

Other reasons a file's card can show are listed in File uploads in the web app, and the messages the upload path itself reports are in Connection and upload messages.

After a restart

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; Sending is what takes the file 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. A receipt is retired once the message that carries it is in the chat.

Why do I see The file has not finished uploading; re-add it and try again?

The chat no longer holds a receipt for that file, so the message cannot pick it up. That happens when DataMind Oda has restarted since the upload finished, or when the file was uploaded for a different chat. Add the file again, and send once its upload finishes.

Do upload receipts survive a restart of DataMind Oda?

No. A receipt is held only while DataMind Oda runs and is not saved between runs, so a restart clears every receipt that was still waiting. Files that already went out with a message stay with their chat; add any waiting file again to send it.

What happens if a send does not go through?

Nothing is lost. The claim is put back: the file stays held for that chat, and the items return to the message box so you can send again.