Skip to main content
تشغيل أي مهارة في Manus
بنقرة واحدة
مستودع GitHub

nestjs-media

يحتوي nestjs-media على 5 من skills المجمعة من DavideCarvalho، مع تغطية مهنية على مستوى المستودع وصفحات skill داخل الموقع.

skills مجمعة
5
Stars
0
محدث
2026-06-25
Forks
0
التغطية المهنية
2 فئات مهنية · 100% مصنفة
مستكشف المستودعات

Skills في هذا المستودع

media-library-attachments
مطوّرو البرمجيات

Attach files to entities with @dudousxd/nestjs-media's media-library layer (spatie-style). Use MediaService.library.attach({ ownerType, ownerId, collection, fileName, mimeType, contents }), library.for(ownerType, id), library.list, library.delete, and library.url(id, conversion?) where image conversions are generated lazily on first url() and cached (or eagerly on attach). Covers MediaCollectionConfig single-file collections, acceptsMimeTypes validation (MimeNotAllowedError), customProperties, plus the column model MediaService.attachments.createFromFile(...) returning an Attachment value object with Attachment.fromJSON / toJSON. Explains the MediaLibrary-not- configured, ImageProcessorMissingError, and ConversionNotDefinedError failures.

2026-06-25
media-module-setup
مطوّرو البرمجيات

Register @dudousxd/nestjs-media's MediaModule in a NestJS app via MediaModule.forRoot or MediaModule.forRootAsync. Wire the storage layer (default + disks with LocalDriver / S3Driver), optionally the media-library layer (store: TypeOrmMediaStore / MikroOrmMediaStore / DrizzleMediaStore / PrismaMediaStore), an imageProcessor (SharpImageProcessor), collections with conversions, and uploads (uploadSessions + tus, direct). MediaModule is @Global; inject MediaService anywhere. Covers MediaModuleOptions, the forRoot-vs-forRootAsync (DI) choice, injection tokens MEDIA_STORAGE / MEDIA_LIBRARY / MEDIA_ATTACHMENTS / MEDIA_UPLOADS / MEDIA_TUS / MEDIA_DIRECT, and the UnknownDiskError when the default disk is missing.

2026-06-25
raw-storage
مطوّرو البرمجيات

Use @dudousxd/nestjs-media's layer-1 disk-agnostic storage through MediaService.disk(name?), which returns a StorageDriver with put / get / stream / exists / delete / copy / move / size / url / temporaryUrl / list. Covers multi-disk routing (default vs named disk), PutOptions (contentType, visibility, metadata), DriverCapabilities (presign, multipart, publicUrls, list), LocalDriver vs S3Driver behaviour, and importing the framework-agnostic facade from @dudousxd/nestjs-media/storage. Explains UnknownDiskError, why temporaryUrl needs a presign-capable disk (S3, not local), and why url() on the local disk requires a baseUrl.

2026-06-25
resumable-and-direct-uploads
مطوّرو البرمجيات

Configure large-file uploads in @dudousxd/nestjs-media. The proxy path streams bytes through NestJS via a resumable tus 1.0.0 server — enable it with uploadSessions (e.g. RedisUploadSessionStore or InMemoryUploadSessionStore) plus the tus option, which mounts MediaUploadController at media/uploads and REQUIRES an application/offset+octet-stream raw-body parser. The direct path uses presigned S3 multipart — enable it with the direct option, which mounts MediaDirectUploadController at media/uploads/direct and needs a presign/multipart disk (no session store). resolveUploadMode picks proxy vs direct (per-call > per-disk > global > auto). Reach the engines via MediaService.uploads (ResumableUploadManager) and MediaService.directUploads (DirectUploadManager). Explains the missing-raw-parser failure and the UnsupportedOperationError when forcing direct on a non-presign disk.

2026-06-25
react-media-uploader
مطوّرو الويب

Upload files from a React app to a @dudousxd/nestjs-media tus endpoint. Use the useMediaUpload() hook (returns status: idle|uploading|done|error, progress 0..1, location, error, plus upload(file, { filename, contentType }) and reset), or the ready-made MediaUploader component (file input + progress bar, onUploaded / onError). Both wrap uploadMedia() — the resumable tus client that POSTs to create, PATCHes chunks with offset tracking, and reports progress — re-exported from @dudousxd/nestjs-media-client alongside mediaUrl(id, conversion?). Covers matching basePath to the server tus.basePath, chunkSize, fetchImpl injection, and the 0..1 (not 0..100) progress scale.

2026-06-25