Introduction
@dimah-s3/server presign handlers and lifecycle hooks for S3 flows.
@dimah-s3/server is the backend for dimah-s3 S3 flows: upload, download, delete, and multipart.
It focuses on presign flows. For list, copy, tagging, and other S3 APIs, use @aws-sdk/client-s3 in your own code.
Presign-first
Clients transfer bytes directly with S3; your server only signs URLs and runs hooks. Flow: authorize, issue a short-lived URL, let the client upload/download, then confirm or clean up on the server.
Why @dimah-s3/server
- One instance —
dimahS3()gives HTTPhandlerand directapi - Lifecycle hooks — auth, validation, and DB writes at each step
- Verified uploads —
HeadObjectbefore trusting file metadata - Any runtime — first-class adapters for Next.js, Express, Hono, Fastify, Elysia, SvelteKit, plus any
Request/Responsestack
Documentation
Setup
S3 client, config, route handlers, and typed client.
Adapters
Mount on Next.js, Express, Hono, Fastify, Elysia, SvelteKit, and more.
Helpers
resolveObjectAcl, buildContentDisposition, parseFileName, and more.
Custom plugins
definePlugin for hooks, endpoints, and context you own.
Guard
Auth on every request.
Upload
Presign, confirm, and persist metadata.
Download
Authorize before issuing GET URLs.
Delete
Guard and cleanup after removal.
Multipart
Large-file upload lifecycle.