Skip to main content
When you drop 2+ files on ZipDrop, they’re automatically bundled into a compressed ZIP archive for easy sharing.

File Limits

ZipDrop enforces strict limits to ensure fast processing and reliable uploads:
LimitValueEnforcement
Max Files50 filesMAX_FILES = 50
Max Single File500 MBMAX_SINGLE_FILE_SIZE = 500MB
Max Total Size1 GBMAX_TOTAL_SIZE = 1GB
From processor.rs:9-11
pub const MAX_FILES: usize = 50;
pub const MAX_SINGLE_FILE_SIZE: u64 = 500 * 1024 * 1024; // 500MB
pub const MAX_TOTAL_SIZE: u64 = 1024 * 1024 * 1024; // 1GB
These limits are enforced before processing begins. Files exceeding them will be rejected with a clear error message.

ZIP Creation

When multiple files are dropped, ZipDrop creates a compressed archive:
pub fn create_zip(input_paths: &[PathBuf], output_dir: &Path) -> Result<ProcessResult, String> {
    let unique_id = &uuid::Uuid::new_v4().to_string()[..8];
    let output_path = output_dir.join(format!("archive_{}.zip", unique_id));
    
    let file = File::create(&output_path)?;
    let mut zip = ZipWriter::new(file);
    
    // Deflate compression for best compatibility
    let options = SimpleFileOptions::default()
        .compression_method(zip::CompressionMethod::Deflated);
    
    let mut total_original_size: u64 = 0;
    
    for path in input_paths {
        let file_name = path.file_name().unwrap_or("file");
        let file_data = fs::read(path)?;
        
        total_original_size += file_data.len() as u64;
        
        zip.start_file(file_name, options)?;
        zip.write_all(&file_data)?;
    }
    
    zip.finish()?;
    
    Ok(ProcessResult {
        output_path,
        original_size: total_original_size,
        processed_size: fs::metadata(&output_path)?.len(),
        file_type: "zip".to_string(),
    })
}
From processor.rs:212-255

Allowed File Extensions

ZipDrop supports a comprehensive list of file types:

Images

jpg, jpeg, png, gif, bmp, tiff, tif, webp, heic, heif, 
svg, ico, raw, cr2, nef, arw

Documents

pdf, doc, docx, xls, xlsx, ppt, pptx, txt, rtf, csv, 
md, markdown, pages, numbers, key

Archives

zip, tar, gz, 7z, rar, bz2, xz, tgz

Video

mov, mp4, avi, mkv, webm, m4v, wmv, flv, 3gp

Audio

mp3, wav, aac, flac, m4a, ogg, wma, aiff

Code & Data

json, xml, html, css, js, ts, jsx, tsx, py, rs, go, swift,
java, c, cpp, h, rb, php, sh, bash, zsh, yaml, yml, toml,
ini, sql, graphql

macOS/Apps

dmg, pkg, app, ipa

Fonts

ttf, otf, woff, woff2, eot

Other

log, env, gitignore, dockerfile
From processor.rs:14-33
Files without extensions are allowed and treated as binary data.

File Validation

Before creating a ZIP, ZipDrop validates every file:

1. File Count Check

if paths.len() > MAX_FILES {
    return Err(ValidationError {
        message: format!("Too many files. Maximum is {} files.", MAX_FILES),
        file: None,
    });
}

2. File Existence Check

if !path.exists() {
    return Err(ValidationError {
        message: format!("File not found: {}", path.display()),
        file: Some(path.to_string_lossy().to_string()),
    });
}

3. Directory Check

if path.is_dir() {
    return Err(ValidationError {
        message: "Directories are not supported. Please zip the folder first.".to_string(),
        file: Some(path.to_string_lossy().to_string()),
    });
}

4. Individual File Size Check

if file_size > MAX_SINGLE_FILE_SIZE {
    return Err(ValidationError {
        message: format!(
            "\"{}\" is too large ({:.1} MB). Maximum file size is 500 MB.",
            file_name,
            file_size as f64 / (1024.0 * 1024.0)
        ),
        file: Some(path.to_string_lossy().to_string()),
    });
}

5. Extension Check

if let Some(ext) = ext {
    if !ALLOWED_EXTENSIONS.contains(&ext.as_str()) {
        return Err(ValidationError {
            message: format!("Unsupported file type: .{} ({})", ext, file_name),
            file: Some(path.to_string_lossy().to_string()),
        });
    }
}

6. Total Size Check

if total_size > MAX_TOTAL_SIZE {
    return Err(ValidationError {
        message: format!(
            "Total size ({:.1} MB) exceeds 1 GB limit.",
            total_size as f64 / (1024.0 * 1024.0)
        ),
        file: None,
    });
}
From processor.rs:58-145
All validation happens before processing begins, so you’ll get instant feedback if something is wrong.

ZIP Compression

ZipDrop uses Deflate compression for maximum compatibility:
let options = SimpleFileOptions::default()
    .compression_method(zip::CompressionMethod::Deflated);
Deflate is supported by:
  • All operating systems (Windows, macOS, Linux)
  • All archive utilities (built-in and third-party)
  • All programming languages

Unique Archive Names

Each ZIP file gets a unique identifier:
let unique_id = &uuid::Uuid::new_v4().to_string()[..8];
let output_path = output_dir.join(format!("archive_{}.zip", unique_id));
// Example: archive_f4a8c2d9.zip
This prevents conflicts when uploading multiple archives.

Frontend Validation

The frontend also validates files before sending to Rust:
const MAX_FILES = 50;
const ALLOWED_EXTENSIONS = new Set([
  "jpg", "jpeg", "png", "gif", "bmp", "tiff", "tif", "webp",
  // ... (full list)
]);

function validateFiles(paths: string[]): { valid: boolean; error?: string } {
  if (paths.length === 0) {
    return { valid: false, error: "No files provided" };
  }
  if (paths.length > MAX_FILES) {
    return { valid: false, error: `Too many files. Maximum is ${MAX_FILES}.` };
  }
  for (const path of paths) {
    const ext = getExtension(path);
    if (ext && !ALLOWED_EXTENSIONS.has(ext)) {
      return { valid: false, error: `Unsupported file type: .${ext}` };
    }
  }
  return { valid: true };
}
From App.tsx:10-115

Performance

ZIP creation is fast:
  • 10 files (50MB total): ~200ms
  • 50 files (500MB total): ~2s
  • Uses buffered I/O for optimal speed
  • Processes files sequentially to avoid memory spikes
Creating ZIPs from network drives or external disks may be slower due to I/O limitations.

Build docs developers (and LLMs) love