@nestjs/platform-fastify
Version:
Nest - modern, fast, powerful node.js web framework (@platform-fastify)
14 lines (13 loc) • 500 B
JavaScript
import { createMultipartInterceptor } from '../multipart/multipart-interceptor.factory.js';
/**
* Accepts text fields only (exposed in `req.body`); any file fails the
* request with a 400. The Fastify counterpart of platform-express's
* `NoFilesInterceptor`.
*
* @param localOptions options merged over the `MultipartModule` defaults
*
* @publicApi
*/
export function NoFilesInterceptor(localOptions) {
return createMultipartInterceptor({ fields: [], strategy: 'NONE' }, localOptions);
}