Reference
Changelog
Release history for the nestjs-media packages.
All packages are versioned together via changesets.
0.8.0
Guards can now be scoped per upload surface.
- 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.
guardsoption onMediaModule.forRoot/forRootAsync— gate all three upload controllers instead of reimplementing auth in aNestMiddleware, since third-party controller classes can't take@UseGuards. Uploads remain unauthenticated by default whenguardsis omitted.mountoption onforRootAsync({ tus?, multipart?, direct? }, default alltrue) — previously always mounted all three controllers, 501-ing the ones you never configured; set the unused ones tofalseso they 404 instead.- Facade re-exports —
@dudousxd/nestjs-medianow 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/completefor the proxy-parallel multipart path.StorageManager.diskNames()(+StorageDriver.stat()/deleteMany()) andMediaService.diskNames().- Telescope media dashboard (
mediaTelescopeExtension()) — amedia.overviewdashboard with 12 data providers (uploads, storage, attachments, disks), backed by optionallist()/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/abortUploadover a presign/multipart-capable disk, exposed asmedia.directUploads. ConfigurabledefaultPartSize(8 MiB) andpresignExpirySeconds(3600).- Multipart driver surface: the optional
MultipartUploadDriveradd-on (createMultipartUpload/presignUploadPart/completeMultipartUpload/abortMultipartUpload), implemented by the S3 driver and gated bycapabilities.multipart. MediaModule.directoption +MediaDirectUploadControllermounted atmedia/uploads/direct(initiate/ per-part presign /complete/abort). NewMEDIA_DIRECTtoken.- Redis session store:
@dudousxd/nestjs-media-upload-redisshipsRedisUploadSessionStoreso resumable (proxy/tus) sessions survive across instances, withkeyPrefix+ slidingttlSeconds(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 theStorageDriverSPI (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
Attachmentvalue object +AttachmentManager(createFromFile/url/temporaryUrl/delete, eager image variants), exposed asmedia.attachments. - ORM column integration: TypeORM
@AttachmentColumn(), MikroORMAttachmentType, PrismatoAttachmentJson/fromAttachmentJson, Drizzleattachment()— all storing the same portable JSON shape. - Owner binding:
media.library.for(ownerType, id)soattach/listno longer repeat the owner — the table-model take on spatie'sHasMedia/InteractsWithMedia. - Lifecycle diagnostics: resumable uploads now emit
upload.start/upload.progress/upload.complete/upload.abort, and attachments emitattachment.create/attachment.delete— all typed, all onnestjs:media:*channels (MEDIA_DIAGNOSTIC_EVENTSexported). 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):
StorageDriverSPI +StorageManager; local and S3 drivers;uploadModeresolution; 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
MediaStoreconformance suite. - Glue points:
nestjs:media:*diagnostics, Telescope watcher, codegen client, ReactuseMediaUpload/MediaUploader. - NestJS
MediaModulewiring all layers;/storagesubpath for raw-filesystem consumers.