Arke
Build

Files

How to upload, download, and manage files on the Arke network.

Uploading Files

Files are uploaded as multipart form data:

POST /files
Content-Type: multipart/form-data
Authorization: Bearer <token>

file: <binary data>
collection_id: 01JCOL...
name: report.pdf

The system automatically:

  1. Stores the binary in R2 (content-addressed)
  2. Creates a file entity with metadata (MIME type, size, storage key)
  3. Queues processing (OCR, text extraction, embedding generation)

Downloading Files

GET /files/:id/download
Authorization: Bearer <token>

Returns the original binary file with appropriate Content-Type headers. Requires the file:download permission action.

File Properties

File entities include these automatic properties:

PropertyDescription
nameOriginal filename
mime_typeMIME type (e.g. application/pdf)
sizeFile size in bytes
storage_keyR2 object key
processing_statuspending, processing, complete, failed

Versioning

File entities follow the same versioning model as all entities. When you update a file's metadata, a new version is created. Binary content is stored separately in R2 and referenced via the storage_key.

On this page