Skip to content

File

A File represents an uploaded blob stored in S3-compatible object storage. Each file carries metadata such as its original filename, system-generated prefixed filename, MIME type, size, directory path, and an owner identifier. Files can be public (accessible without authentication) or private (accessible only through a time-limited presigned URL).

Sample Object

{
  "id": "fl_abc123def456",
  "original_filename": "report.pdf",
  "filename": "aB3xK9mN2p_report.pdf",
  "path": "documents/project_d8lcac3epc83jq9i2d60/aB3xK9mN2p_report.pdf",
  "dir_path": "documents/project_d8lcac3epc83jq9i2d60",
  "type": "application/pdf",
  "size": 204800,
  "owner_id": "usr_abc123def456"
}

Fields

FieldTypeDescription
idstringUnique identifier for the file.
original_filenamestringThe name of the file as provided during upload.
filenamestringSystem-generated storage filename. A random 10-character prefix is prepended to the original name to prevent collisions.
pathstringFull object key within the bucket. Constructed as {dir_path}/{filename}. Prefixed with public/ when the file is public.
dir_pathstringVirtual directory path formatted as {directory}/project_{project_id}.
typestringMIME type of the file as reported by the client during upload.
sizeint64File size in bytes.
owner_idstringUnique identifier of the user who owns the file.

Actions

Uploading a file

Upload a file through a multipart form request. The file binary is stored in S3 while the metadata is recorded in the database. Files larger than 5 MB are automatically split into chunks for multipart upload.

File upload is available through the SDK and REST API.

Getting a presigned download link

Generate a time-limited presigned URL for secure file access. The link expires after one hour and grants read access to the underlying S3 object.

File retrieval is available through the SDK and REST API.

Listing all files

Retrieve all files associated with the current project and tenant. The response is an array of file objects ordered by creation date.

File listing is available through the SDK and REST API.

Deleting a file

Remove a file and its associated metadata. The S3 object is deleted and the database record is marked as removed.

File deletion is available through the SDK and REST API.