Skip to main content
Storage is RevoEngine’s durable file and folder system. Use it for uploaded source files, generated reports, integration payloads, attachments, Agent artifacts, and operational evidence that must remain addressable by a stable storageEntryId. Storage owns more than bytes. A file entry also carries its location, version, content type, metadata, effective access, retention, archive state, and any derived index used for bounded reads.

The four objects to distinguish

An upload session is not a file. It reserves the intended target and records upload progress, lease, access, retention, metadata, schema, and compute policy. It cannot be read with getFileData() and must not be used as a storageEntryId. The file becomes durable and readable only when the session reaches FINALIZED. Use the finalized entry ID for reads and later processing. Asynchronous indexing can still be pending after publication. Inspect the session if finalization fails, expires or is cancelled.

Choose the write path

Do not create an upload session for every write. A session is useful when bytes arrive outside the current call, the payload is large, parts must be retried, or a structured file is assembled over several calls.

Two independent session settings

uploadMode and writeMode answer different questions. writeMode: 'direct' does not mean “return an upload URL.” It is a structured-writer optimization for a fixed, declared CSV/XLSX layout. Ordinary browser uploads choose uploadMode: 'direct' and normally leave writeMode at its default. See Upload sessions for the complete lifecycle and Structured files for schemas, types, and parser behavior.

Read by format

Use the narrowest reader that matches the file: Structured reads return a page with rows, headers, columns, next, and nextCursor. Copy the cursor exactly and keep pages bounded. In record mode, walkFileData() processes the same record formats in awaited batches; it does not treat plain text, a top-level JSON object, or binary files as rows. For XML, provide recordPath; for a specific Excel worksheet, provide sheet. Do not parse CSV by splitting on commas or newlines. Quoted separators, escaped quotes, and multiline records are valid CSV. CSV syntax and source field counts are validated before record processing. Invalid input fails with STORAGE_CSV_INVALID and bounded location diagnostics by default. Explicit onError: 'skipRow' skips only records with the wrong field count and reports their original locations; syntax and record-size errors still abort. CSV statistics distinguish logical rowCount from actual physical lines, including headers and blanks. Explicit mode: 'lines' is available for custom text workflows; it returns raw strings without CSV interpretation. See Structured files for dialect, validation and line-count semantics. In file details, choose Compress for a regular file or Unpack for gzip. The small dialog creates a new file in the same folder and preserves the source. An expired archived file needs a new retention period before Restore; the editor supplies a fresh period and keeps server errors visible.

Read and unpack gzip

The existing record and document readers can read gzip-compressed files, including orders.csv.gz and report.xlsx.gz. They use the format of the inner file. The first read may stage a temporary decoded copy in Storage for later pages. Download and binary integrations still transfer the original archive. Use storage.unpack to save a separate decoded file. Choose a destination folder or keep the source folder. Existing names are protected from overwrite. Repeat the request with the same source version, destination and retry key to reuse the result. Gzip members from incremental uploads decode in order into one file.

Prepare repeated or large gzip reads

Cold automatic reads allow up to 256 MiB of stored archive bytes and 256 MiB of decoded content, checked separately. A larger unprepared archive returns STORAGE_GZIP_PREPARATION_REQUIRED; retrying the same cold read does not prepare it. The Assistant can inspect archive metadata and offer temporary read preparation, a separate unpacked file, or leaving the archive unchanged. An unknown decoded size stays unknown until measured. For writes and compressed database exports, set prepareForRead: 'sync' to wait for indexed access or 'async' to queue preparation. Omit it for gzip-only publication. Prepared copies inherit source access, are pinned to the source content version and expire within 24 hours. Inspect preparation status before depending on a queued result; publication of the archive alone does not prove preparation succeeded. Use storage.unpack when a durable separate decoded file is needed.

Workspaces and access

The Platform API exposes the Storage workspaces available to the current identity. A workspace is a governed view, not a separate file format or upload protocol. Its policy decides whether the caller may list, read, create folders, or upload. Access is evaluated from the entry and its ancestors:
  • restricted: false uses the workspace’s normal visibility rules;
  • restricted: true limits access to authorized users, groups, owners, or administrators;
  • a restricted ancestor remains effective even if a child is not marked restricted;
  • a namespace, folder ID, or signed URL never grants access by itself.
Resolve logical paths at runtime instead of copying folder UUIDs between instances. Use resolveFolderPath() when the path must already exist and ensureFolderPath() when authorized code may create missing segments.

Retention and lifecycle

Upload-session expiry and file retention are separate:
  • session expiresAt limits how long the unfinished upload can remain active;
  • retention.ttlSeconds starts only after finalization;
  • retention.expiresAt sets an absolute file expiry;
  • retention: null means no expiry;
  • omitting retention uses the destination’s default on create and preserves it on update.
An expired file becomes unavailable and is archived with TTL_EXPIRED before later cleanup. Manual archive is recoverable while the entry remains archived; permanent delete is a distinct, destructive operation. Use optimistic version checks for update, move, archive, restore, delete, and replacement flows.

Compute policy

computeStats controls when Storage builds reusable text or structured-file indexes: With sync, finalization persists the supported file statistics with the entry and its STORAGE_CREATED or STORAGE_UPDATED event. The event and response contain statistics for the same uploaded version, even if another upload later replaces that file. XML uploads initially contain physical text statistics; structured XML indexing requires an explicit recordPath on the read. CSV, TSV, XLSX, and text uploads default to synchronous computation. Other binary uploads default to none. Choose sync when the next operation immediately needs rows, worksheet metadata, or line ranges. Choose async when file availability matters more than immediate indexing.

Failure and retry rules

  • If a direct transfer returns successfully but confirmation is uncertain, read the session. Continue only after FINALIZED.
  • If a part call times out, read the manifest before sending data again. Incremental retries can otherwise create an additional part.
  • A fresh matching target can return STORAGE_UPLOAD_IN_PROGRESS; inspect or recover the existing session instead of creating parallel writers.
  • Abort abandoned active sessions as best-effort cleanup.
  • A version conflict means the target changed. Reload the entry before deciding whether to replace it.
  • Temporary upload and download URLs are credentials. Never persist or log them.
  • Make downstream Event and Job processing idempotent against the source entry ID and version.
Temporary failures while scheduling part recovery or asynchronous statistics do not hold an upload response open for the normal transport retry window. The platform retains committed work and retries publication every minute. It preserves the original retry identity until a confirmed unavailable task name requires a successor. Upload session expiry, cancellation and finalization rules still apply.

Storage identifiers

Use storageEntryId for a finalized file or folder and storageUploadSessionId for an in-progress upload. Upload finalization makes the uploaded Storage version available. The retired Files resource is unavailable.

Next steps

Upload sessions

Implement direct, incremental, and chunked uploads with the correct completion boundary.

Structured files

Declare one CSV/TSV/XLSX schema and choose fallback or strict validation.

HTTP integrations

Stream Storage sources and targets through external HTTP calls.

SDK storage and batching

Use sessions and bounded reads from Node.js.

Storage low-code reference

Inspect the current storage.* signatures.

Platform API reference

Inspect exact HTTP operations and DTOs.
Last modified on November 11, 2026