OpenList Multipart Upload API
    • Init multipart upload
      POST
    • Upload one chunk
      PUT
    • Complete multipart upload
      POST
    • Query upload session
      GET
    • Abort multipart upload
      POST

      Init multipart upload

      POST
      /api/fs/multipart/init
      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.

      请求参数

      Authorization
      JWT Bearer
      在 Header 添加参数
      Authorization
      示例:
      Authorization: ********************
      or
      Header 参数

      请求示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST '/api/fs/multipart/init' \
      --header 'File-Path: /uploads/movie.mkv' \
      --header 'X-File-Size;' \
      --header 'X-Chunk-Size;' \
      --header 'Overwrite;' \
      --header 'X-File-Md5;' \
      --header 'X-File-Sha1;' \
      --header 'X-File-Sha256;' \
      --header 'Last-Modified;' \
      --header 'Authorization: Bearer <token>'

      返回响应

      🟢200Success
      application/json
      Session created or resumed; data is the session snapshot plus resumed
      Bodyapplication/json

      示例
      {
          "code": 200,
          "message": "success",
          "data": {
              "upload_id": "3f2c9e2a-6c4b-4d2e-9a2b-1f0e8c7d5a41",
              "state": "receiving",
              "attempt": 0,
              "path": "/uploads/movie.mkv",
              "size": 734003200,
              "chunk_size": 10485760,
              "total_chunks": 70,
              "received": [
                  [
                      0,
                      2
                  ]
              ],
              "received_bytes": 31457280,
              "frontier": 3,
              "storage_progress": 4.29,
              "resumed": true
          }
      }
      🟠400Bad Request
      🟠401Unauthorized
      🟠403Forbidden
      🟠405Upload Not Supported
      🔴500Storage Error
      修改于 2026-07-13 17:33:15
      下一页
      Upload one chunk
      Built with