A
Atlas
...

File Uploads

Accept file uploads with your form submissions. Files are stored securely and accessible via signed URLs.

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
Enterprise100 MB50Custom

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 & Enterprise

    All file types are supported.

    Video Addon (Pro+)

    With the Video Addon ($29.99/mo):

  • Video files up to 2 GB
  • MP4, WebM, QuickTime formats
  • 50 GB video storage
  • Resumable uploads
  • 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
        }
      ]
    }

    Accessing Uploaded Files

    Via Dashboard

    Click any submission to view uploaded files. Click a file to download or preview.

    Via API

    bash
    # Get file info
    curl "https://atlasforms.app/api/v1/files/{file_id}" \
      -H "Authorization: Bearer fep_your_api_key"
    
    # Download file
    curl "https://atlasforms.app/api/v1/files/{file_id}/download" \
      -H "Authorization: Bearer fep_your_api_key" \
      -o filename.pdf

    Response

    json
    {
      "id": "file-uuid",
      "submission_id": "submission-uuid",
      "original_filename": "document.pdf",
      "mime_type": "application/pdf",
      "file_size_bytes": 102400,
      "file_category": "document",
      "uploaded_at": "2024-01-15T10:30:00Z",
      "download_url": "https://..."
    }

    Video Uploads

    For large video files (up to 2 GB), use the Video Addon with resumable uploads.

    Enable Video Addon

  • Go to Dashboard → Settings
  • In the Subscription section, click Add to Plan under Video Addon
  • Complete checkout
  • Resumable Upload API

    javascript
    // 1. Initialize upload
    const initResponse = 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',
        fileSize: 1073741824, // 1 GB
        mimeType: 'video/mp4',
        formId: 'abc123xyz'
      })
    });
    
    const { uploadId, uploadUrl, chunkSize } = await initResponse.json();
    
    // 2. Upload chunks
    const file = document.querySelector('input[type="file"]').files[0];
    const chunks = Math.ceil(file.size / chunkSize);
    
    for (let i = 0; i < chunks; i++) {
      const start = i * chunkSize;
      const end = Math.min(start + chunkSize, file.size);
      const chunk = file.slice(start, end);
    
      await fetch(`${uploadUrl}?part=${i + 1}`, {
        method: 'PUT',
        body: chunk
      });
    }
    
    // 3. Complete upload
    await fetch(`https://atlasforms.app/api/v1/uploads/${uploadId}/complete`, {
      method: 'POST',
      headers: { 'Authorization': 'Bearer fep_your_api_key' }
    });

    Resume Interrupted Upload

    javascript
    // Get upload status
    const status = await fetch(`https://atlasforms.app/api/v1/uploads/${uploadId}`, {
      headers: { 'Authorization': 'Bearer fep_your_api_key' }
    }).then(r => r.json());
    
    // Resume from last completed chunk
    const startChunk = status.completedChunks;

    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+)

    Business and Enterprise plans include automatic image processing:

    https://atlasforms.app/api/v1/files/{id}?w=800&h=600&fit=cover
    ParameterDescription
    wWidth in pixels
    hHeight in pixels
    fitcover, contain, fill
    qQuality (1-100)
    fFormat: webp, jpeg, png

    Storage Management

    Monitor storage usage in Dashboard → Settings.

    When approaching storage limits:

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