File Uploads
Accept file uploads with your form submissions. Files are stored in Cloudflare R2 and are accessed through signed URLs that expire.
Requirements
File uploads are available on all plans with varying limits.
| Plan | Max File Size | Max Files/Submission | Storage |
|---|---|---|---|
| Starter | 10 MB | 2 | 100 MB |
| Pro | 25 MB | 10 | 10 GB |
| Business | 50 MB | 25 | 50 GB |
Supported File Types
Starter Plan
Pro Plan
Business Plan
On every plan, Atlas rejects:
Video Add-on (Pro and Business)
With the Video Add-on ($29.99/mo):
HTML Form Upload
<form action="https://atlasforms.app/f/abc123xyz" method="POST" enctype="multipart/form-data">
<input type="text" name="name" required>
<input type="email" name="email" required>
<input type="file" name="attachment">
<button type="submit">Send</button>
</form>Important: Use enctype="multipart/form-data" for file uploads.
JavaScript Upload
const form = document.querySelector('form');
form.addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(form);
const response = await fetch('https://atlasforms.app/f/abc123xyz', {
method: 'POST',
body: formData // Don't set Content-Type - browser handles it
});
const data = await response.json();
console.log('Files uploaded:', data.files);
});Multiple Files
<input type="file" name="documents" multiple>Or multiple file inputs:
<input type="file" name="photo">
<input type="file" name="resume">
<input type="file" name="cover_letter">Response with Files
{
"success": true,
"submission_id": "550e8400-e29b-41d4-a716-446655440000",
"files": [
{
"id": "file-uuid-1",
"filename": "photo.jpg",
"type": "image/jpeg",
"size": 245000
},
{
"id": "file-uuid-2",
"filename": "resume.pdf",
"type": "application/pdf",
"size": 102400
}
]
}Every file in the request is stored before the submission is saved. If any file can't be stored, nothing is saved: the response is 400 when the file was rejected (for example a damaged image) or 502 when storage failed and the submission can be retried. The error names the file, so a submission never reports success with a file missing.
The exception is a full account. When your file storage is full, submissions are still saved, without their attachments, and the response lists them in files_rejected with a warning for the submitter. The dashboard shows which files weren't stored, and you're emailed. A banner appears in the dashboard from 80% usage. Check usage any time with atlas usage or GET /api/v1/usage.
Accessing Uploaded Files
Via Dashboard
Open a submission to see its uploaded files and download them.
Via API
Request a file with your project API key (fep_...; account tokens are not accepted here). The response contains a signed url that expires after one hour and needs no further authentication:
curl "https://atlasforms.app/api/v1/files/{file_id}" \
-H "Authorization: Bearer fep_your_api_key"Response
{
"data": {
"id": "file-uuid",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"category": "document",
"url": "https://...",
"expires_in": 3600
}
}Video Uploads
The upload API accepts video files up to 2 GB with the Video Add-on. The file is uploaded directly to storage in 50 MB parts. Uploads must be completed within 24 hours.
Enable the Video Add-on
Upload API
// 1. Start the upload
const init = await fetch('https://atlasforms.app/api/v1/uploads', {
method: 'POST',
headers: {
'Authorization': 'Bearer fep_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: 'video.mp4',
file_size: file.size,
mime_type: 'video/mp4',
form_id: 'form-uuid' // optional
})
}).then(r => r.json());
const { file_id, chunk_size_bytes, parts } = init.data;
// 2. Upload each part to its presigned URL and keep the ETag
const completed = [];
for (let i = 0; i < parts.length; i++) {
const chunk = file.slice(i * chunk_size_bytes, (i + 1) * chunk_size_bytes);
const res = await fetch(parts[i].url, { method: 'PUT', body: chunk });
completed.push({ partNumber: parts[i].partNumber, etag: res.headers.get('ETag') });
}
// 3. Complete the upload
await fetch(`https://atlasforms.app/api/v1/uploads/${file_id}`, {
method: 'POST',
headers: {
'Authorization': 'Bearer fep_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ parts: completed })
});To cancel an upload, send DELETE /api/v1/uploads/{file_id}.
File Validation
Atlas validates files server-side:
Image Transformations (Business)
On the Business plan, uploaded images are stored in Cloudflare Images. Request a preset size with the variant query parameter:
GET /api/v1/files/{id}?variant=thumbnailAvailable variants: public (default), thumbnail, medium, large. Arbitrary sizes, cropping, and format conversion are not supported.
Storage Management
Monitor storage usage in Dashboard → Settings. Files are deleted along with their submissions when your plan's retention period ends.
When approaching storage limits: