Stop writing tenant isolation logic from scratch. Tenantbox gives your SaaS per-tenant file storage, quota enforcement, and usage tracking in two API calls. Files go directly to Tenantbox storage. Your server is never in the way hence faster uploads.
We boast faster uploads!
Files go straight to storage - your server is never in the way.
import axios from 'axios'
import fs from 'fs'
// Step 1 — Get presigned upload URL
const { data } = await axios.post(
'https://api.tenantbox.dev/api/storage/upload/',
{
tenant_id: 'user_123',
filename: 'contract.pdf',
content_type: 'application/pdf',
},
{
headers: {
'Authorization': 'Bearer sk_live_xxx',
'Content-Type': 'application/json',
},
}
)
console.log('File path:', data.file_path)
console.log('New tenant:', data.is_new_tenant)
// Step 2 — Upload directly to Tenantbox storage. Your server never sees the file.
const fileBuffer = fs.readFileSync('contract.pdf')
await axios.put(data.presigned_url, fileBuffer, {
headers: { 'Content-Type': 'application/pdf' },
})
console.log('Upload complete!')Manage uploads, enforce quotas, and isolate tenants — without writing the boilerplate yourself.
alice@acme.com
Total files
Storage used
Storage limit
500 MBAll confirmed uploads for this tenant.
| File | Size | Status | |
|---|---|---|---|
contract_2026.pdf contract_2026.pdf | 1.2 MB | Confirmed | |
profile_photo.png profile_photo.png | 3.8 MB | Confirmed | |
q3_report.xlsx q3_report.xlsx | 614.4 KB | Confirmed | |
onboarding.mp4 onboarding.mp4 | 23 MB | Pending |
2
API calls to upload
$0
Egress fees
∞
Tenants per project
No complex SDK. No server-side file handling. Just two HTTP calls and your file is safely stored, isolated, and tracked.
Your server makes one authenticated POST to Tenantbox with the tenant ID, filename, and content type. You get back a presigned upload URL and the file path.
Your client PUTs the file directly to the presigned URL. The file never touches your server — which means faster uploads and no bandwidth cost on your end.
Tenantbox automatically creates the tenant on first upload, namespaces the file, enforces storage quotas, and starts tracking usage. Zero boilerplate on your side.
Your server is never the bottleneck
Because uploads go client → storage directly, large files don't block your API, consume memory, or rack up egress charges. Tenantbox handles isolation, quotas, and tracking in the background.
"We were spending hours writing per-tenant S3 path logic, quota checks, and confirming uploads server-side. Tenantbox replaced all of that with two API calls. We shipped multi-tenant file uploads in an afternoon."
Jamie Müller
Co-founder & CTO, Docflow — Beta user
Every alternative either requires you to build tenant isolation yourself, or buries the feature you need behind enterprise pricing.
| Feature | S3 AWS S3 | R2 Cloudflare R2 | GCS Google Cloud | SB Supabase | TB Tenantbox |
|---|---|---|---|---|---|
Per-tenant file isolationAutomatic namespace per user/org | |||||
Auto-create tenant on uploadNo pre-registration required | |||||
Per-tenant quota enforcementHard limits before upload begins | |||||
Direct client-to-storage uploadsFiles never touch your server | |||||
Usage tracking per tenantFiles count, bytes used | |||||
Zero egress fees✦ Serving files to end users | |||||
Dashboard for file managementView, delete, download files | |||||
Free to get started | |||||
Two-call upload APINo SDK required |
✦ Egress fees apply when serving files outside the same region. Tenantbox offers zero egress fees, globally.
Free to get started. No credit card required. Two API calls and your files are isolated, tracked, and quota-enforced per tenant — out of the box.