UNPKG

@nestjs/platform-fastify

Version:

Run NestJS on Fastify: the HTTP adapter with Fastify's plugins, JSON schemas and serialization.

15 lines (14 loc) • 632 B
import { createMultipartInterceptor } from '../multipart/multipart-interceptor.factory.js'; /** * Accepts files in each of `uploadFields` and exposes them grouped by field * name in `req.files` (`@UploadedFiles()`). The Fastify counterpart of * platform-express's `FileFieldsInterceptor`. * * @param uploadFields accepted fields, each with an optional `maxCount` * @param localOptions options merged over the `MultipartModule` defaults * * @publicApi */ export function FileFieldsInterceptor(uploadFields, localOptions) { return createMultipartInterceptor({ fields: uploadFields, strategy: 'OBJECT' }, localOptions); }