Files guide

Add a managed file to an application record.

Connect a file column to a storage site, upload through Daptin, and verify that record access still governs delivery from cache and storage.

  • Asset column
  • Record access
  • Range delivery

Schema

Connect the field to a named store.

- Name: photo
  DataType: text
  ColumnType: file
  IsForeignKey: true
  ForeignKeyData:
    DataSource: cloud_store
    Namespace: product-media
    KeyName: photos

Namespace must match the cloud store name; KeyName selects the folder or prefix beneath its root. Use the appropriate file, image, video, audio, markdown, or related column treatment required by the product.

Upload path

Write the bytes and record metadata together.

Uploads require update access to the owning record. Daptin supports direct streaming to local or rclone-backed storage and an S3 multipart path for large objects, while tracking pending and completed upload state in the record.

Small and ordinary files

Send the expected file metadata and content through the record or asset upload path, then retrieve the returned asset URL.

Large S3 objects

Exercise initiation, part URLs, completion, and abort behavior before depending on multipart upload in the client.

Failed uploads

Confirm incomplete or missing storage objects do not appear as successfully completed record assets.

Replacement

Replace an existing asset and verify the record metadata and cached response move to the new file.

Delivery

Test authorization before cache behavior.

The asset route checks table peek permission and row read permission before serving the file. Cached entries retain authorization information, and changed record metadata is checked before a cached asset is reused.

  • An allowed owner or group member receives the file.
  • An unrelated user and guest are denied when the record is private.
  • If-None-Match returns the expected conditional response for a current ETag.
  • Audio and video clients can request byte ranges.
  • Compressible files negotiate gzip without applying it to range responses.
  • Files larger than the memory-cache limit are streamed rather than loaded into one unbounded buffer.
  • A replaced file is not hidden behind stale cached metadata.

Boundary

Verify sensitive-file access in your deployment.

Daptin checks access before delivery, but asset configurations and client paths vary. Test owner, group, non-owner, anonymous, cached, and uncached requests with the exact schema and proxy configuration before storing sensitive material.

Storage durability, retention, malware scanning, content moderation, and backup policy remain deployment decisions; a managed asset field does not replace them.

Choose where the bytes are stored.