Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/noelzappy/vaulx/llms.txt

Use this file to discover all available pages before exploring further.

Vaulx supports downloading an entire folder tree as a ZIP archive. Two modes are available: streaming (immediate, synchronous — the archive is assembled on the fly and piped directly to the browser) and background job (async, for large trees — a worker assembles the ZIP into S3 and returns a 24-hour presigned download link). Both modes work for authenticated users browsing their own folders and for visitors accessing a public folder share. The background mode deduplicates work intelligently: if an existing job’s snapshot matches the current folder state (same file count, total bytes, and newest file timestamp), the existing job is returned instead of creating a new one.

Streaming ZIP (immediate)

Authenticated folder download

folderID
uuid
required
The UUID of the folder to download.
GET /files/{folderID}/zip Streams the folder tree as a ZIP archive directly to the client. The response begins immediately — no background job is created. Authentication: required.
  • Admins receive every file in the tree.
  • Non-admins receive only files they uploaded themselves (mirrors the standard download access rules).
Response headers
Content-Type: application/zip
Content-Disposition: attachment; filename="<folderName>.zip"
  • Writes a folder.zip_download entry to the audit log.
  • Returns 404 if the folder does not exist.
  • Returns 401 if the request is unauthenticated.
Because headers are sent before the archive is fully written, errors that occur mid-stream cannot change the HTTP status code. A truncated ZIP may be delivered if an S3 fetch fails partway through.

Public folder share ZIP (streaming)

slug
string
required
The 64-character hex slug of a folder share.
folder
uuid
Optional. Download a specific subfolder within the shared tree rather than the root. The UUID must be within the shared root’s tree.
GET /s/{slug}/zip Streams the shared folder (or an in-tree subfolder) as a ZIP archive. No authentication required.
  • Returns 404 if the slug is not found or is a file share (not a folder share).
  • Returns 410 Gone if the share has expired or the view limit has been reached.
  • Returns 404 if the folder query parameter points to a UUID outside the shared tree.

Background ZIP job (async)

Background jobs are suited for large folder trees where streaming would time out or the browser connection might be unstable. The client polls a status endpoint until the job transitions to ready, then follows the presigned S3 link to download.

Queue ZIP job (authenticated)

folderID
uuid
required
The UUID of the folder to prepare as a ZIP.
POST /files/{folderID}/zip/prepare Finds an existing reusable job or creates a new one, then returns an HTML status fragment (designed for HTMX hx-swap). Authentication: required. Response: HTML status fragment — one of:
  • Pending/running → polling fragment with hx-get pointed at the status URL, polling every 3 seconds.
  • Ready → download link to the 24-hour presigned S3 URL.
  • Failed → error message fragment.
A job is reused if one exists with matching file_count, content_bytes, and a created_at newer than the folder’s newest file modification. If the folder contents have changed, a new job is created.

Poll job status (authenticated)

folderID
uuid
required
The UUID of the folder whose job status to query.
GET /files/{folderID}/zip/status Returns the current HTML status fragment for the folder’s active ZIP job. Authentication: required.
Job statusFragment content
pending or runningPolling fragment (hx-get every 3 seconds)
readyDownload link with 24-hour presigned S3 URL
failedError message
No job foundEmpty <div class="zip-status">

Queue ZIP job for public share

slug
string
required
The 64-character hex slug of a folder share.
folder
uuid
Optional. Target a subfolder within the shared tree.
POST /s/{slug}/zip/prepare Queues (or reuses) a background ZIP job for a public folder share. No authentication required. Rate limit: 5 requests per IP per minute.
  • Returns 404 if the slug is not a folder share.
  • Returns 410 Gone if the share has expired.
  • The share_id is recorded on the job row for reference.

Poll job status for public share

slug
string
required
The 64-character hex slug of a folder share.
folder
uuid
Optional. Must match the subfolder used when the job was created.
GET /s/{slug}/zip/status Returns the current HTML status fragment for the share’s active ZIP job. No authentication required.
  • Returns 404 if the slug is not a folder share.
  • Returns 410 Gone if the share has expired.

ZIP job model

FieldTypeNotes
idUUIDPrimary key
folder_idUUIDFK → folders.id (ON DELETE CASCADE)
share_idUUID | nullFK → shares.id (ON DELETE SET NULL); set for share-originated jobs
statustextpending, running, ready, or failed
file_countintSnapshot of file count at job creation time
content_bytesbigintSnapshot of total uncompressed bytes at job creation time
s3_keytext | nullS3 object key of the finished archive; null until ready
size_bytesbigintActual size of the produced ZIP in S3
errortext | nullError message if status = 'failed'
created_attimestamptzJob creation time
expires_attimestamptz | nullSet to NOW() + 24 hours when job transitions to ready
Background ZIP download links are presigned S3 URLs that expire after 24 hours. If the folder contents change (a new file is added or a file is deleted), the snapshot no longer matches and a new ZIP job is automatically created on the next prepare request.
Stale running jobs are automatically marked as failed with the message interrupted by server restart when the Vaulx server starts up. Expired ready jobs are periodically transitioned to failed with the message expired by a background cleanup routine.

Build docs developers (and LLMs) love