I use routing-controller

We can use multer through @UseBefore decorator

create 'upload' object

const upload = multer();

and use @UseBefore above http method decorator( ex: @Pet )

@UseBefore(upload.single("thisIsFileName"))

@Put

 

"thisIsFileName" is put parameterName which U define in client-end-point

 

'nodeJS > http transaction' 카테고리의 다른 글

nodeJs http file transfer  (0) 2019.04.25

+ Recent posts