v0.9.0New: signed links, plugins and events

Write your file uploads once. Run them on any cloud.

Fileway is one free, open-source TypeScript API for S3, R2, Google Cloud, Azure, Supabase, Cloudinary and local disk. Files stream on Node.js, Bun, Deno and the edge, and switching providers is a one-line change.

  • MIT licensed
  • Zero core dependencies
  • Built for TypeScript
upload.ts
$npm install @fileway/core @fileway/s3
const client = new FilewayClient({
  driver: new S3Driver({ bucket: "uploads" }),
})

const result = await client.upload(stream, {
  filename: "report.pdf",
})
storage providers
7
storage providers
core dependencies
0
core dependencies
runtimes
5
runtimes
tests on every release
350+
tests on every release
Works withAWS S3Cloudflare R2Google Cloud StorageAzure BlobSupabaseCloudinaryMinIOLocal disk

One client. Any driver.

Switch backends, not your code

The FilewayClient API never changes. Only the driver config. Full TypeScript inference adapts to each driver's metadata.

local.ts
import { FilewayClient } from "@fileway/core"
import { LocalDriver } from "@fileway/local"

const client = new FilewayClient({
  driver: new LocalDriver({
    directory: "./uploads",
    baseUrl: "/files",
  }),
})

// TypeScript infers result.meta.localPath
const result = await client.upload(stream, {
  filename: "profile.jpg",
  metadata: { userId: "usr_123" },
})

Full TypeScript inference: your IDE knows exactly what each driver returns

Who it's for

Built for how you work

Whether you're shipping a side project alone or running storage for a team, here is where Fileway fits.

Ship file uploads in an afternoon, and never rewrite them when your app grows.

  • You're in this situation“I just need users to upload a profile picture, without learning a cloud SDK.”

    What Fileway doesOne upload call works with S3, R2, Supabase, Cloudinary and the rest. Swap providers by changing the driver.

  • You're in this situation“My app runs on Vercel Edge or Cloudflare Workers, and the AWS SDK won't load there.”

    What Fileway doesEvery cloud driver is pure fetch and Web Crypto, so it runs on Node, Bun, Deno and edge runtimes.

  • You're in this situation“I store files on my server's disk for now, but I'll need the cloud later.”

    What Fileway doesStart with the local driver. Moving to S3 or R2 is a one-line driver change, not a rewrite.

  • You're in this situation“I need to show a private file to one user without making the bucket public.”

    What Fileway doesGenerate a link that expires. Providers without presigning get app-signed links, built in.

Developer experience

From 50 lines to 5

No more vendor-specific SDKs, stream conversions, or fragile error handling. One API. End-to-end type safety.

The old way
// AWS SDK v3: 50+ lines per provider
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"
import { Readable } from "node:stream"

const s3 = new S3Client({ region: "us-east-1" })

async function uploadToS3(
  buffer: Buffer,
  key: string
): Promise<string> {
  // Manual stream → buffer conversion
  const command = new PutObjectCommand({
    Bucket: "my-bucket",
    Key: key,
    Body: buffer,
  })
  
  try {
    await s3.send(command)
    return `https://s3.amazonaws.com/my-bucket/${key}`
  } catch (err) {
    // Per-provider error handling
    console.error("S3 upload failed:", err)
    throw err
  }
}
The Fileway
import { FilewayClient } from "@fileway/core"
import { S3Driver } from "@fileway/s3"

const client = new FilewayClient({
  driver: new S3Driver({
    bucket: "my-bucket",
    region: "us-east-1",
  }),
})

// Accepts ReadableStream<Uint8Array> directly
const result = await client.upload(stream, {
  filename: "report.pdf",
})

console.log(result.url)  // Fully typed

Same client works with Local, S3, GCS, Azure, Supabase, Cloudinary, and more. Just swap the driver.

Features

Everything file storage needs, in one small library

The parts every app ends up writing by hand, built in and working the same on every provider.

No SDKs, zero core dependencies

Every driver is built on fetch, Web Streams and Web Crypto. Your install stays clean, and your bundle carries only the drivers you use.

dependencies: 0cloud SDKs: 0node:* imports in cloud drivers: 0

Runs everywhere

The same code on servers and at the edge.

Node.jsBunDenoCloudflare WorkersVercel Edge

True streaming

Files move as ReadableStream from request to provider. No buffering, no memory spikes, even for gigabyte uploads.

Signed links, both ways

Share private files with links that expire, and let browsers upload straight to storage with signed upload links. Works even on local disk.

Manage files

list, stat, copy, move and delete with the same calls on every provider, with paging handled for you.

Plugins and events

Every operation emits one event with who did it. Build audit trails, usage metering and webhooks with a small plugin.

Typed errors and retries

One StorageError with a clear code on every provider. Network blips, timeouts and rate limits retry with backoff.

Types that follow your driver

Each driver's metadata is typed, so autocomplete adapts to your provider and mistakes show up before runtime.

result.meta.publicId // Cloudinary
result.meta.etag // S3

FAQ

Questions developers ask

Something else on your mind? Ask in GitHub Discussions.

Is Fileway ready for production?

Fileway is before 1.0, so a minor release can include breaking changes, and every one is listed in the changelog with how to upgrade. Each release runs 350+ unit tests plus integration tests against real S3 (MinIO) and Azure (Azurite) emulators, and packages are published to npm with provenance.

Do my files go through Fileway's servers?

No. Fileway is a library that runs inside your app. Files go straight from your app to your own storage provider, using your own credentials. Nothing is sent anywhere else.

How is this different from using the AWS SDK directly?

An SDK ties your code to one provider, and often to Node.js. Fileway gives you one small API across seven providers, runs on the edge, streams instead of buffering, and adds what SDKs leave to you: typed errors, retries, signed links, upload links, events and plugins.

Can users upload from the browser without exposing my keys?

Yes. Your server creates a signed upload link that fixes the file name, type and size limit and expires in minutes. The browser uploads with a plain fetch, and the size limit is enforced while the file streams.

My provider isn't listed. Can I still use Fileway?

Any S3-compatible service works with the S3 driver, including Cloudflare R2, MinIO, DigitalOcean Spaces and Backblaze B2. For anything else, open an issue, or write a driver: the contract is small and documented.

Is it free?

Yes. Fileway is MIT licensed and free to use in any project, commercial or not. Fileway Infrastructure, an optional hosted dashboard, is coming later as a paid product. The framework stays free.

Now in betaFileway Infrastructure

A dashboard for every file your app stores.

Fileway Infrastructure is an optional hosted dashboard for apps built with Fileway. Add the @fileway/infra plugin to see every upload, download and delete in an audit log with analytics, and to browse and share your app's files from the browser. Your storage keys stay in your app, and files never pass through us.

Sign in with GitHub or Google to create your account. Free during the beta.

  • Analytics and audit log
  • Browse and share files
  • Upload protectionSoon
  • Teams and rolesSoon

By signing in you agree to the terms. See how we handle your data in the privacy policy.

Ship your first upload in five minutes.

Install two packages, pick a driver, call upload. Switch providers whenever you want.

$npm install @fileway/core @fileway/s3
Read the quickstart

MIT licensed. Free forever.