Skip to content

Server

The mstransfer server is a FastAPI application. Run it with mstransfer serve, or build it in Python and serve it however you like.

Transfer lifecycle

Each upload is tracked in an in-memory registry under the X-Transfer-ID the client sends:

stateDiagram-v2
    [*] --> RECEIVING
    RECEIVING --> RECEIVED: body fully written
    RECEIVING --> ERROR: read/write failure
    RECEIVED --> DONE: store-as msz
    RECEIVED --> DECOMPRESSING: store-as mzml
    DECOMPRESSING --> DONE
    DECOMPRESSING --> ERROR

The registry keeps up to 1024 records. Past that, the least recently used finished (DONE or ERROR) record is evicted; in-progress transfers are never evicted. Records do not survive a restart.