platform-api
File Storage
Overview
OrbioCloud Storage provides secure file uploads with automatic virus scanning (ClamAV), per-tenant storage quotas, and time-limited signed URLs for access. Files are stored securely with tenant isolation.
Upload a File
// Requires secret key (sk) with storage:write scope
const file = await orbio.storage.upload(selectedFile, {
filename: 'bottle-photo.jpg', // optional override
metadata: { category: 'photos' }, // optional JSONB
});
// Returns:
// {
// id: 'uuid',
// filename: 'bottle-photo.jpg',
// content_type: 'image/jpeg',
// size_bytes: 245000,
// url: 'https://...signed-url...',
// url_expires_in: 3600,
// metadata: { category: 'photos' },
// created_at: '2026-04-12T...'
// }List Files
const files = await orbio.storage.list({ page: 1, limit: 20 });
// Returns paginated list: { items, page, limit, total, has_more }Get File with Fresh URL
const file = await orbio.storage.get(fileId);
// file.url is a fresh 1-hour signed URL
// Call get() again when the URL expiresDelete a File
await orbio.storage.delete(fileId);
// Removes from storage + DB + logs negative storage usageLimits & Security
Maximum file size: 20MB per upload
All files are scanned with ClamAV before storage — malware is rejected
Storage quota enforced per tenant tier (returns 402 when exceeded)
Signed URLs expire after 1 hour — call get() for a fresh URL
Files are tenant-isolated — no cross-tenant access