Aviary
Reference

Changelog

Release history for the nestjs-media packages.

Each package is versioned on its own with changesets and has its own CHANGELOG.md. The headings below are @dudousxd/nestjs-media releases. The facade's 0.9.x were patch releases, but @dudousxd/nestjs-media-core 0.9.0 was a breaking minor: DriverCapabilities.ranged became required, so a third-party storage driver must declare whether it honours byte-range reads (stream(path, { start, end })).

0.10.0 — on @nestjs/storage

Breaking (0.x minor). Ships as @dudousxd/nestjs-media 0.10.0, -core 0.10.0 and -dashboard 0.17.0. nestjs-media drops its own storage layer and works on the disks of NestJS's first-party @nestjs/storage. See Migrating.

  • Removed: StorageManager, the StorageDriver interface, -disk-local, S3Driver, InMemoryDriver, runStorageDriverConformance, MediaService.disk()/diskNames(), MEDIA_STORAGE/MEDIA_STORAGE_SHARED, the @dudousxd/nestjs-media/storage entry, FileNotFoundError, UnknownDiskError.
  • MediaModule injects Storage from StorageModule; multipart: { disk: s3Multipart(opts) } adds native S3 multipart; store/uploadSessions accept { inject, useFactory }.
  • MediaService.serve() streams a record through serveFile(); an optional authorize hook checks read (for serve() and url()), attach and delete.
  • Protecting the routes (breaking): the guards option is removed from MediaModule and MediaDashboardModule, replaced by decorators (class decorators applied to every mounted controller). routes: false mounts no controller so you can mount your own subclasses, and mount now works on forRoot too. In production (NODE_ENV === 'production'), mounting routes with no decorators throws at boot. See Protecting the routes.
  • Dashboard login removed (breaking): auth / useAuth, the session cookie, the /me, /login, /session and /logout routes, the ./react entry and openMediaConsole are gone. Authenticate with your app's own strategy and authorize with decorators. forRootAsync's injectObjectInsights is now inject.
  • MediaService.delete() passes store errors through (only a missing record is a no-op) and throws "MediaLibrary is not configured" without a store.
  • -disk-s3 is the s3Multipart() side-car (part-level multipart + delimiter listing, no AWS SDK).
  • Dashboard: folders from the side-car or folded from the flat listing, .keep folders, serveFile() previews, streamed uploads and cross-disk copies.
  • Folder listings: one page size on every path, 50 by default, at most 1000 (folderListingLimit()); a forged cursor is InvalidListingCursorError (400). See Folders.
  • ORM helpers: typeOrmMediaStore({ connectionName }), drizzlePgMediaStore(...) and friends on /nest entries.
  • Testing: describeMediaDiskConformance() (run on LocalDisk, InMemoryDisk, and S3Disk on MinIO) and storageOf().

-core 0.10.1 accepts @dudousxd/nestjs-diagnostics >=0.7.0 <1.0.0, and -telescope 0.6.1 accepts @dudousxd/nestjs-telescope ^1.0.0 || ^2.0.0.

0.8.0

Guards can now be scoped per upload surface. (guards was removed in 0.10.0; use decorators.)

  • Per-surface guards: guards: { tus: [AdminGuard], multipart: [AuthenticatedGuard] } gates each upload controller with its own list, since the surfaces often carry different sensitivity (session creation admin-only, part PUTs any authenticated user). The plain-array form still gates all three uniformly; an omitted key leaves that surface unguarded.

0.7.0

Three fixes for consumer friction on the upload controllers.

  • guards option on MediaModule.forRoot/forRootAsync — gate all three upload controllers instead of reimplementing auth in a NestMiddleware, since third-party controller classes can't take @UseGuards. Uploads remain unauthenticated by default when guards is omitted. (Removed in 0.10.0 in favor of decorators.)
  • mount option on forRootAsync ({ tus?, multipart?, direct? }, default all true) — previously always mounted all three controllers, 501-ing the ones you never configured; set the unused ones to false so they 404 instead.
  • Facade re-exports — @dudousxd/nestjs-media now re-exports the error classes, ResumableUploadManager, mediaDiagnosticKey, MediaDiagnosticEvent, publishMedia, and the storage-consumer/upload-session types from -core, so consumers no longer need a direct dependency on it for these.

0.6.0

  • Native S3 multipart streaming: proxy/tus uploads now stream each chunk straight into a native S3 multipart upload instead of buffering the whole file at complete().
  • MediaMultipartUploadController: PUT /media/uploads/:id/parts/:partNumber + POST /media/uploads/:id/complete for the proxy-parallel multipart path.
  • StorageManager.diskNames() (+ StorageDriver.stat()/deleteMany()) and MediaService.diskNames().
  • Telescope media dashboard (mediaTelescopeExtension()) — a media.overview dashboard with 12 data providers (uploads, storage, attachments, disks), backed by optional list()/count()/aggregate() SPI additions on the upload/store adapters.

0.5.0

Adds the direct (presigned multipart) upload path end-to-end: the browser PUTs each part straight to S3 while the backend only orchestrates.

  • DirectUploadManager (core): createUpload / presignPart / completeUpload / abortUpload over a presign/multipart-capable disk, exposed as media.directUploads. Configurable defaultPartSize (8 MiB) and presignExpirySeconds (3600).
  • Multipart driver surface: the optional MultipartUploadDriver add-on (createMultipartUpload / presignUploadPart / completeMultipartUpload / abortMultipartUpload), implemented by the S3 driver and gated by capabilities.multipart.
  • MediaModule.direct option + MediaDirectUploadController mounted at media/uploads/direct (initiate / per-part presign / complete / abort). New MEDIA_DIRECT token.
  • Redis session store: @dudousxd/nestjs-media-upload-redis ships RedisUploadSessionStore so resumable (proxy/tus) sessions survive across instances, with keyPrefix + sliding ttlSeconds (24h default).

0.4.0

Media lifecycle events now flow through @dudousxd/nestjs-diagnostics — auto-captured by the generic Telescope bridge with no per-event wiring.

0.3.0

  • list() added to the StorageDriver SPI (folders + paginated file entries, with an optional cross-bucket override), implemented for local, S3 (ListObjectsV2), and the in-memory testing driver.
  • MikroORM 7 supported as a peer alongside v6.

0.2.0

Adds the attachment column model (adonis-attachment style) alongside the existing media table, and an owner-binding ergonomic for the table model.

  • Attachments (layer 2, column model): the Attachment value object + AttachmentManager (createFromFile / url / temporaryUrl / delete, eager image variants), exposed as media.attachments.
  • ORM column integration: TypeORM @AttachmentColumn(), MikroORM AttachmentType, Prisma toAttachmentJson / fromAttachmentJson, Drizzle attachment() — all storing the same portable JSON shape.
  • Owner binding: media.library.for(ownerType, id) so attach / list no longer repeat the owner — the table-model take on spatie's HasMedia/InteractsWithMedia.
  • Lifecycle diagnostics: resumable uploads now emit upload.start / upload.progress / upload.complete / upload.abort, and attachments emit attachment.create / attachment.delete — all typed, all on nestjs:media:* channels (MEDIA_DIAGNOSTIC_EVENTS exported). The Telescope watcher records every milestone (skipping per-chunk progress).

0.1.0

Initial release — filesystem + media-library for NestJS in one package.

  • Storage (layer 1): StorageDriver SPI + StorageManager; local and S3 drivers; uploadMode resolution; resumable upload engine + tus 1.0.0 HTTP handler.
  • Media-library (layer 2): spatie-style collections (single-file replace, MIME validation, ordering, custom properties), image conversions (sharp, lazy + eager).
  • ORM stores: TypeORM, MikroORM, Drizzle, Prisma — one shared MediaStore conformance suite.
  • Glue points: nestjs:media:* diagnostics, Telescope watcher, codegen client, React useMediaUpload / MediaUploader.
  • NestJS MediaModule wiring all layers; /storage subpath for raw-filesystem consumers.

On this page