Skip to main content

File Storage

Each app can optionally enable S3-compatible file storage (DigitalOcean Spaces, Magalu Cloud Storage, AWS S3, MinIO, etc.).

Configuration

Enable storage in the Dashboard under Storage (S3) tab when creating/editing an app:

FieldDescription
BucketS3 bucket name
RegionRegion (e.g. us-east-1, nyc3)
EndpointProvider URL (e.g. https://nyc3.digitaloceanspaces.com)
Access Key IDS3 access key
Secret Access KeyS3 secret key

Endpoints

MethodPathDescription
POST/{app}/filesUpload file (multipart)
GET/{app}/filesList files
GET/{app}/files/{id}Get file metadata
GET/{app}/files/{id}/download?ttl=3600Download (302 → signed URL)
GET/{app}/files/{id}/url?ttl=3600Get signed URL
DELETE/{app}/files/{id}Delete file

All endpoints require the app's JWT token.

Example

# Upload
curl -X POST localhost:8080/myapp/files \
-H "Authorization: Bearer $TOKEN" \
-F "file=@photo.jpg"

# Response: {"id":"uuid","name":"photo.jpg","size":2048576,"mime_type":"image/jpeg","url":"/myapp/files/uuid/download"}

# Download (redirects to signed S3 URL)
curl -L localhost:8080/myapp/files/uuid/download \
-H "Authorization: Bearer $TOKEN"

# Get signed URL with custom TTL
curl localhost:8080/myapp/files/uuid/url?ttl=7200 \
-H "Authorization: Bearer $TOKEN"
# → {"url":"https://bucket.s3.amazonaws.com/...?AWSAccessKeyId=..."}