
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@panelist/nest-file-fastify
Advanced tools
This library adds decorators for Nest.js to support @fastify/multipart. The API is very similar to the official Nest.js Express file decorators.
NPM
$ npm install @blazity/nest-file-fastify @fastify/multipart
Yarn
$ yarn add @blazity/nest-file-fastify @fastify/multipart
import { FileInterceptor, UploadedFile, StorageFile } from '@blazity/nest-file-fastify';
@Post('upload')
@UseInterceptors(FileInterceptor('file'))
uploadFile(@UploadedFile() file: StorageFile) {
console.log(file);
}
FileInterceptor
arguments:
fieldname
: string - name of the field that holds a file
options
: optional object of type UploadOptions
import { FilesInterceptor, UploadedFiles, StorageFile } from '@blazity/nest-file-fastify';
@Post('upload')
@UseInterceptors(FilesInterceptor('files'))
uploadFile(@UploadedFiles() files: StorageFile[]) {
console.log(files);
}
FilesInterceptor
arguments:
fieldname
: string - name of the field that holds files
maxCount
: optional number - maximum number of files to accept
options
: optional object of type UploadOptions
import { FileFieldsInterceptor, UploadedFiles, StorageFile } from '@blazity/nest-file-fastify';
@Post('upload')
@UseInterceptors(FileFieldsInterceptor([
{ name: 'avatar', maxCount: 1 },
{ name: 'background', maxCount: 1 },
]))
uploadFile(@UploadedFiles() files: { avatar?: StorageFile[], background?: StorageFile[] }) {
console.log(files);
}
FileFieldsInterceptor
arguments:
uploadFields
: object of type UploadField
options
: optional object of type UploadOptions
import { AnyFilesInterceptor, UploadedFiles, StorageFile } from '@blazity/nest-file-fastify';
@Post('upload')
@UseInterceptors(AnyFilesInterceptor()
uploadFile(@UploadedFiles() files: StorageFile[]) {
console.log(files);
}
AnyFilesInterceptor
arguments:
options
: optional object of type UploadOptions
FAQs
@fastify/multipart decorators for Nest.js
We found that @panelist/nest-file-fastify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.