NestJS Stream Interceptor
Parse request form-data to file streams
Instruction
Currently, we are unable to catch the stream while file(s) uploading, so we write the interceptor.
Usage
import {
FileStreamInterceptor,
FileStreams,
FileStream,
} from '@ininderprint/nestjs-filestream-interceptor';
@Controller()
export class AppController {
@Post('/')
@UseInterceptors(FileStreamInterceptor())
upload(@FileStreams() fileStreams: FileStream[]) {
console.log(fileStreams);
return;
}
}