Production-ready file uploadsin 3 files, ~50 lines

Stop fighting with AWS SDKs and presigned URLs. Pushduck gives you type-safe, framework-agnostic file uploads that work everywhere—from Next.js to Remix, Cloudflare to AWS.

~15KB gzipped (no AWS SDK bloat)
Full type safety
16+ frameworks, any S3 provider

// Works with

Next.js
Remix
SvelteKit
Astro
Nuxt.js
Hono
+10 more
app/api/upload/route.ts
import { createUploadConfig } from 'pushduck/server';

const { s3 } = createUploadConfig()
  .provider("aws", {
    bucket: process.env.AWS_BUCKET_NAME!,
    region: process.env.AWS_REGION!,
    accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
  })
  .build();

const router = s3.createRouter({
  imageUpload: s3.image().maxFileSize('5MB'),
});

export const { GET, POST } = router.handlers;
export type AppRouter = typeof router;
live uploading demo toCloudflareCloudflare R2
Click or drag files above to see Pushduck in action

Technical Overview

// Key features and architectural decisions

16+ Framework Support

Universal handlers work with any web framework and edge runtime - from Next.js to Hono, Express to Expo to Cloudflare Workers

5+ Storage Providers

AWS S3, Cloudflare R2, DigitalOcean Spaces, Google Cloud, MinIO, Wasabi, Backblaze - switch anytime

Type-Safe APIs

Full TypeScript support with intelligent autocomplete and compile-time validation

CLI Setup

Interactive CLI guides you through setup. Get from zero to uploads in minutes

Advanced Schema Validation

Built-in file type, size, and custom validation with detailed error messages

Production Ready

Presigned URLs, chunked uploads, progress tracking, retry logic, and error handling

File Type Validation

// Built-in MIME type checking & custom rules

Images

JPEG, PNG, WebP with automatic optimization

Profile pics, galleries, thumbnails

Videos

MP4, WebM, AVI with size and duration limits

Course content, demos, clips

Documents

PDF, DOCX, XLSX with virus scanning

Contracts, reports, spreadsheets

Any File Type

Custom validation rules for any format

3D models, audio, archives

Key Benefits

// What makes Pushduck different

Zero vendor lock-in

Switch storage providers or frameworks without rewriting code

Production-ready security

Presigned URLs, file validation, size limits, and CORS handling

Developer experience first

CLI setup, TypeScript intellisense, detailed error messages

Performance optimized

Direct uploads, chunked transfers, progress tracking, automatic retries

Setup Steps

1.npx @pushduck/cli@latest init
2.Configure storage provider
3.Add upload routes
Production ready
Pushduck Banner

Get Started

// Production-ready uploads in minutes