A
Atlas
...

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.

PlanMax File SizeMax Files/SubmissionStorage
Starter10 MB2100 MB
Pro25 MB1010 GB
Business50 MB2550 GB

Supported File Types

Starter Plan

  • Images: JPEG, PNG, WebP, GIF
  • Documents: PDF
  • Pro Plan

  • Images: JPEG, PNG, WebP, GIF, AVIF
  • Documents: PDF, Word (.doc, .docx)
  • Business Plan

  • Everything above, plus video (MP4, MOV, WebM), audio (MP3, OGG, WAV), Excel (.xls, .xlsx), and PowerPoint (.ppt, .pptx)
  • Other file types (for example ZIP or CSV) are accepted too. They are always served as downloads, never displayed in the browser.
  • On every plan, Atlas rejects:

  • Files whose content doesn't match their declared type (checked against the file's signature bytes)
  • Images, video, audio, or PDFs in formats Atlas can't verify
  • Executable web content such as HTML, SVG, XML, and JavaScript
  • Video Add-on (Pro and Business)

    With the Video Add-on ($29.99/mo):

  • MP4, WebM, and QuickTime videos
  • Up to 100 MB per video through the form endpoint on Pro (Business keeps its 50 MB per-file limit)
  • Up to 2 GB per video through the upload API (see below)
  • 50 GB video storage
  • HTML Form Upload

    html
    <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

    javascript
    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

    html
    <input type="file" name="documents" multiple>

    Or multiple file inputs:

    html
    <input type="file" name="photo">
    <input type="file" name="resume">
    <input type="file" name="cover_letter">

    Response with Files

    json
    {
      "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:

    bash
    curl "https://atlasforms.app/api/v1/files/{file_id}" \
      -H "Authorization: Bearer fep_your_api_key"

    Response

    json
    {
      "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

  • Go to Dashboard → Settings
  • Add Video Uploads in the add-ons section
  • Complete checkout
  • Upload API

    javascript
    // 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:

  • File size - Must be within plan limits
  • File type - Must be allowed for your plan
  • Content verification - MIME type must match actual content (prevents spoofing)
  • Storage quota - Must have available storage
  • 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=thumbnail

    Available 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:

  • Delete old submissions with files
  • Export and archive files externally
  • Upgrade your plan for more storage