# OpenList Multipart Upload API ## API Docs - [Init multipart upload](https://s.apifox.cn/42a006a5-de65-44d6-a0c9-b9c46377ac25/486489280e0.md): Create an upload session and immediately start the server-to-driver upload pipeline, or resume an existing one. Session reuse rules (same user + path + size): a live "receiving" session is resumed only when the supplied file hashes match the ones it was created with — without hashes, path+size cannot prove file identity, so no resume; a "failed_retriable" session is always reused (its buffered data was already discarded, refill is guarded by per-chunk CRC); any other existing session is superseded and cleaned up. Supplied file hashes travel ahead of the file data, so drivers with server-side deduplication can finish instantly (rapid upload) without receiving any chunk. - [Upload one chunk](https://s.apifox.cn/42a006a5-de65-44d6-a0c9-b9c46377ac25/486489281e0.md): Send one chunk as the raw request body. Chunks are idempotent and may be sent concurrently and out of order, but only within the receiving window [frontier, frontier+8), which slides forward as the driver consumes data. Every chunk except the last must be exactly chunk_size bytes; the last one is the remainder. When the window is full the request parks on the server for up to 10 seconds waiting for a free slot before answering 429. If the session already completed (e.g. rapid upload) the chunk is absorbed idempotently and the returned snapshot has state=completed — stop sending the remaining chunks. The server always consumes the request body before answering, so browsers never see an early response. - [Complete multipart upload](https://s.apifox.cn/42a006a5-de65-44d6-a0c9-b9c46377ac25/486489282e0.md): Join point: blocks until the upload pipeline reaches a terminal state, mirroring how /fs/put only answers once the driver upload finished. Rejected immediately while chunks are still missing, so an incomplete upload never holds the connection open. On success the session is reclaimed right away. If a CDN cuts the connection early, poll /status until a terminal state. - [Query upload session](https://s.apifox.cn/42a006a5-de65-44d6-a0c9-b9c46377ac25/486489283e0.md): Two valid parameter combinations: pass upload_id alone, or pass path and size together to discover a resumable live session of the current user (e.g. after a page refresh, or to poll the verdict when complete was cut off by a CDN). Each parameter is optional on its own, but one of the two combinations is required. - [Abort multipart upload](https://s.apifox.cn/42a006a5-de65-44d6-a0c9-b9c46377ac25/486489284e0.md): Cancel the pipeline (the driver handles it as a request cancellation — the local driver, for example, removes the unfinished destination file), discard all buffered chunks and remove the session.