Create staged file-upload targets

Requires the staged_uploads create permission. Creates short-lived targets for uploading file content directly to temporary storage. client_reference_id must be unique within this request, contain 1-128 letters, digits, underscores, or hyphens, and is correlation data rather than an idempotency key. Targets expire after about 10 minutes. Copy every returned form_fields value unchanged, append the file field last, and request a new target instead of reusing an expired target. A valid batch returns HTTP 200 even when one or every item has an item-level error.
需要 staged_uploads 建立權限。系統會建立短效上傳目標,讓檔案內容可直接上傳至暫存空間。 client_reference_id 在同一請求中必須唯一,長度為 1-128 個字元,且只能包含英文字母、數字、 底線或連字號;此欄位僅供關聯結果,並非冪等鍵。上傳目標約於 10 分鐘後到期。請原樣複製所有 form_fields 值,最後再加入 file 欄位;目標到期後請申請新的目標,不要重複使用。有效的批次請求 即使部分或所有項目發生項目層級錯誤,仍回傳 HTTP 200。

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
files
array of objects
required
length between 1 and 20

Images needing separate upload targets; each reference must be unique.
需要個別上傳目標的圖像;每個參考值必須唯一。

files*

Metadata for one local image; image bytes are not included.
一個本機圖像的中繼資料;不包含圖像內容。

string
required
length between 1 and 128
^[A-Za-z0-9_-]+$

Caller-generated correlation value used to match this file to its result. It must be unique within this request and is not an idempotency key.
呼叫端產生的關聯值,用於將 檔案與結果配對。此值在同一請求中必須唯一,且並非冪等鍵。

string
enum
required

Resource policy; only IMAGE is supported.
資源原則;僅支援 IMAGE。

Allowed:
string
required
length between 1 and 128

Local image basename without directories. Its extension must match content_type: .jpg or .jpeg for image/jpeg, .png for image/png, or .gif for image/gif.
不含目錄的本機圖像檔名。副檔名必須符合 content_type:image/jpeg 使用 .jpg 或 .jpeg, image/png 使用 .png,image/gif 使用 .gif。

string
enum
required

MIME type of the image to upload.
待上傳圖像的 MIME 類型。

Allowed:
integer
required
1 to 10485760

Exact image size from 1 byte through 10 MiB.
圖像的確切大小,範圍為 1 位元組至 10 MiB。

Responses

400

INVALID_REQUEST, INVALID_CLIENT_REFERENCE, or DUPLICATE_CLIENT_REFERENCE
請求或參考 ID 無效

413

BATCH_SIZE_EXCEEDED
超出批次大小限制

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json