0.0.8 • Published 4 years ago

@ininderprint/nestjs-filestream-interceptor v0.0.8

Weekly downloads
21
License
MIT
Repository
-
Last release
4 years ago

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;
  }
}