dimah-s3v1.5.11

Server

Backend handlers, route policies, and lifecycle hooks for S3 file flows.

@dimah-s3/server generates presigned URLs, enforces route constraints, authorizes requests through guards, and coordinates lifecycle callbacks.

Uploads and, by default, downloads travel directly between the browser and the bucket through short-lived signed URLs. Downloads can instead use same-origin proxy mode. S3 credentials stay on the server, and deletions run server-side.

Key features

  • Unified configuration — dimahS3() exports both an HTTP route handler and a typed server-side api.
  • Server-owned keys — The server generates namespaced object keys instead of trusting browser-provided keys.
  • HeadObject verification — Confirmation rechecks stored byte length and Content-Type metadata from S3.
  • Lifecycle hooks — Run auth, persistence, quotas, and cleanup at defined operation boundaries.
  • Framework adapters — Mount handlers in Next.js, Hono, Express, Fastify, SvelteKit, Elysia, and standard Fetch runtimes.

Documentation

On this page