@ininderprint/nestjs-filestream-interceptor
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @ininderprint/nestjs-filestream-interceptor

Weekly Downloads

196

Version

0.0.8

License

MIT

Unpacked Size

413 kB

Total Files

12

Last publish

Collaborators

  • yusef.ho.tw
  • zhangrgk