Nestjs File Uploads
ASecurityMake the request only persist the upload and enqueue a `FileUploadedEvent`; do not resize or transcode inside the HTTP handler. ```ts await files.saveMetadata(fileId, objectKey); try { await queue.add(FILE_UPLOADED, { fileId, objectKey }, { attempts: 3, backoff: { type: 'exponential', delay: 1000 } }); } catch (error) { await files.markProcessingEnqueueFailed(fileId, error); } return { fileId, status: 'queued' }; ``` A BullMQ worker downloads the object, processes it, validates the result, an...
- 584 stars
- 0 votes
- 0 copies
- 5 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill nestjs-file-uploads --agent claude-codeAre you the author of Nestjs File Uploads?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nestjs-file-uploads-843bfa64)Make the request only persist the upload and enqueue a `FileUploadedEvent`; do not resize or transcode inside the HTTP handler.
```ts
await files.saveMetadata(fileId, objectKey);
try {
await queue.add(FILE_UPLOADED, { fileId, objectKey }, { attempts: 3, backoff: { type: 'exponential', delay: 1000 } });
} catch (error) {
await files.markProcessingEnqueueFailed(fileId, error);
}
return { fileId, status: 'queued' };
```
A BullMQ worker downloads the object, processes it, validates the result, and re-uploads it. Keep upload limits and magic-byte validation at the boundary, and make the worker idempotent.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.