Skip to main content
Use an upload session when the bytes arrive outside the current call, the file is too large for one request, parts must be retried, or a CSV/XLSX file is assembled incrementally. An upload session is a temporary, durable control record. It reserves the intended target and stores progress, lease, access, retention, metadata, schema, and compute policy. It is not a Storage file. A readable storageEntryId exists only after the session reaches FINALIZED.

Choose an upload mode

writeMode is a separate setting for structured CSV/XLSX row materialization. It does not choose how raw bytes are transferred. See Structured files.

Direct frontend upload

Create the session in trusted backend or low-code logic, return only the temporary upload contract to the frontend, and keep the session ID for status checks.
The frontend must use the exact method, URL, and headers:
After the byte transfer completes, query the session until it reaches a terminal status. Do not call finalizeUploadSession() for the managed direct path. Storage owns finalization after it confirms the completed transfer.
The upload response and the session state prove different things:
  • successful fetch() means the temporary target accepted the transfer;
  • FINALIZED means Storage published the governed file entry;
  • only the finalized entry should trigger later reads, Events, or Jobs.
For raw CSV with computeStats: 'sync', finalization also validates CSV syntax and source field counts. STORAGE_CSV_INVALID prevents publication; successful byte transfer alone does not prove that the CSV is valid. Set csv.onError: 'skipRow' explicitly to skip source field-count mismatches with diagnostics. Syntax and record-size errors still abort, and readers need the same explicit policy. A failed session can retain temporary bytes, so inspect its state and explicitly abort it when abandoning the upload. Native generated row parts retain row and physical-line counts during encoding, so finalization can reuse those counts. See CSV validation.

Investigate an upload

Keep the upload session ID and finalized Storage entry ID to find the recorded journey in Observability. The session retains the creating execution across later direct-upload finalization. Its lifecycle duration covers reservation through the terminal state, including waiting for the producer and finalization; it is not a network-transfer benchmark. A replacement records a new origin for the current file version.

Incremental generated upload

Choose incremental mode for one producer that appends data in order. Omit partNumber during normal writes; Storage assigns it.
For structured rows, send rows or sheets instead of manually serializing delimiters. One part must contain exactly one of data, rows, or sheets.

Chunked and repairable upload

Use chunked mode when part numbers belong to the caller:
Re-uploading a known number repairs that part. Finalization rejects missing parts, conflicting checksums, and invalid manifests.

Platform API lifecycle

The default Explorer routes are: Writable workspaces expose their own create-session route. After creation, use the returned session ID with the normal lifecycle operations. The main response shapes are: Use the generated Platform API reference for exact routes and request schemas. These Storage operations currently expose no machine-readable success-response schema in OpenAPI; use the response shapes above and the low-code Storage reference when handling their results.

Lease, retention, and recovery

Session expiry is an upload lease, not file retention:
  • every accepted part renews the lease;
  • use extendUploadSession() only for an intentional idle gap;
  • retention.ttlSeconds begins when the file is finalized;
  • retention: null means the finalized file does not expire;
  • an expired, failed, or aborted session cannot be resumed.
If a request result is uncertain, read the session before retrying:
  • FINALIZED — use the target entry; do not upload again;
  • RESERVED or UPLOADING — inspect the manifest and continue deliberately;
  • FINALIZING — wait and read again;
  • FAILED, ABORTED, or EXPIRED — create a new session.
For incremental mode, an uncertain retry without checking the manifest can create another numbered part. For replacement, always preserve the current target version fence.
Temporary upload URLs and headers are credentials. Return them only to the authorized uploader, never log them, and never store them as file metadata.

Next steps

Last modified on October 20, 2026