Guides

File Upload

Learn all the ways to upload files to ZeroDrive.

Upload Methods Overview

MethodUse CaseMax SizeBest For
Direct UploadSmall to medium files100MBSimple integrations
Presigned URLLarge files, client-side uploads100MBBrowser uploads, large files
Batch UploadMultiple files100MB eachBulk operations

Direct Upload

The simplest way to upload files directly to ZeroDrive.

Endpoint

Headers

Basic Upload

cURL

JavaScript

Python

Response

Upload to Specific Folder

Using Folder ID

Using Folder Path (Auto-Create)

Automatically creates nested folders if they don't exist:

This creates the folder hierarchy Documents → Reports → 2024 and places the file inside.

Multiple File Upload

Upload several files in a single request:

cURL

JavaScript

Response (Multiple Files)

Presigned URL Upload (Two-Step)

For large files or client-side uploads, use presigned URLs to upload directly to storage.

Step 1: Request Upload URL

Response

Step 2: Upload to Presigned URL

Upload directly to the storage URL using a PUT request:

JavaScript

Step 3: Complete Upload

Notify ZeroDrive that the upload is complete:

Upload with Progress Tracking

Track upload progress for better UX:

Supported File Types

ZeroDrive automatically detects and supports 50+ file types:

Documents

  • PDF (.pdf)
  • Microsoft Word (.doc, .docx)
  • Microsoft Excel (.xls, .xlsx)
  • Microsoft PowerPoint (.ppt, .pptx)
  • Text files (.txt, .rtf)
  • Markdown (.md)

Images

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • WebP (.webp)
  • SVG (.svg)
  • BMP (.bmp)
  • TIFF (.tif, .tiff)

Audio

  • MP3 (.mp3)
  • WAV (.wav)
  • FLAC (.flac)
  • AAC (.aac)
  • OGG (.ogg)

Video

  • MP4 (.mp4)
  • WebM (.webm)
  • MOV (.mov)
  • AVI (.avi)
  • MKV (.mkv)

Archives

  • ZIP (.zip)
  • RAR (.rar)
  • 7Z (.7z)
  • TAR (.tar, .tar.gz)

Code

  • JavaScript (.js, .jsx)
  • TypeScript (.ts, .tsx)
  • Python (.py)
  • HTML/CSS (.html, .css)
  • JSON (.json)
  • YAML (.yaml, .yml)

Handling Upload Errors

Storage Quota Exceeded (413)

Solution: Upgrade your plan or delete unused files.

File Too Large (413)

Solution: Use presigned URL upload for chunked uploads, or compress the file.

Invalid File Type (400)

Partial Upload Failure

When uploading multiple files, some may succeed while others fail:

Best Practices

  1. Validate before upload

    • Check file size and type client-side before uploading
    • Show clear error messages to users
  2. Use presigned URLs for large files

    • Direct uploads are limited to 100MB
    • Presigned URLs bypass server limits
  3. Implement retry logic

  4. Show progress for large files

    • Users appreciate knowing how long uploads will take
  5. Handle offline scenarios

    • Queue uploads when offline
    • Resume when connection is restored