dimah-s3v1.5.4

Introduction

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

@dimah-s3/server is the backend engine for dimah-s3. It generates presigned URLs, enforces route constraints, authorizes requests through guards, and coordinates lifecycle callbacks.

Upload and download operate directly between the client and the bucket via short-lived signed URLs. S3 credentials remain on the server, while deletion is handled securely server-side.

Key features

  • Unified configurationdimahS3() exports both an HTTP route handler and a typed server-side api.
  • Server-owned keys — Keys follow {keyPrefix}/{uuid}/{name} namespaces to prevent bucket tampering.
  • HeadObject verification — Real file sizes and MIME types are verified directly from S3 on upload confirmation.
  • Lifecycle hooks — Inject auth, database records, or quota checks at presign, confirmation, and deletion.
  • Universal adapters — Native handlers for Next.js, Hono, Express, Fastify, SvelteKit, Elysia, and standard Fetch.

Documentation

On this page