Vaulx uses a two-stage deletion model to protect against accidental data loss. When a file is deleted through the normal UI, it is soft-deleted — itsDocumentation 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.
status column is set to 'deleted' and it becomes invisible in the file browser, but the underlying record in PostgreSQL and the object in S3 remain intact. Admins can review all soft-deleted files in the /admin/trash panel and either restore them with a single click or permanently remove them when the data is no longer needed.
Soft delete vs hard delete
Soft Delete
Route:
DELETE /files/{fileID}Sets the file’s status to 'deleted'. The database row and the S3 object are preserved. The file disappears from the regular file browser but appears in /admin/trash. Logged as file.delete in the audit log.Available to the editor who uploaded the file or any admin.Hard Delete
Route:
DELETE /files/{fileID}?permanent=trueAdmin-only. Calls storage.DeleteObject to remove the S3 object, then calls HardDeleteFile to remove the database row entirely. The row cannot be recovered. Logged as file.hard_delete in the audit log.handler.FilesHandler.DeleteFile:
403 Forbidden.
Who can delete files
| User | Soft delete | Hard delete |
|---|---|---|
| Admin | ✅ Any file | ✅ Any file (?permanent=true) |
| Editor | ✅ Files they uploaded | ❌ Not permitted |
| Viewer | ❌ Not permitted | ❌ Not permitted |
file.uploaded_by to the requesting user’s ID:
File status lifecycle
Every file moves through the following states, constrained by aCHECK in the schema:
| Status | Meaning |
|---|---|
pending | Upload initiated but not yet confirmed |
active | Upload confirmed; visible in the file browser |
deleted | Soft-deleted; visible only in /admin/trash |
Trash panel
Route:GET /admin/trash
Admin-only. Displays all files where status = 'deleted', fetched via the ListDeletedFiles query. Each row in the panel shows:
- File name
- Human-readable size (e.g.
4.2 MB) - Uploader display name
- Creation date formatted as
Jan 2, 2006
403 Access denied.
Restoring a file
Route:POST /admin/trash/{fileID}/restore
Admin-only. Calls RestoreFile to set the file’s status back to 'active', making it visible in the file browser again. On success, the action is written to the audit log with action file.restore.
HX-Trigger response header with a showToast event showing "File restored". If the fileID is not found in the database RestoreFile returns a 404 Not Found response.
Find the file to restore
Locate the file by name, uploader, or date. The panel lists all soft-deleted files across all users.
Restoring a file does not restore its original folder if that folder was deleted. The file will still reference the original
folder_id in the database, which may now point to a non-existent folder. In that case the file will not appear under any folder in the browser until it is moved to a valid folder.