Upload file with multer
cbcarlos07 opened this issue · comments
When I use with only restify
I use:
server.post('/upload', uploads.single('foto'), async (req, res, next)=>{
try {
res.send( saveObj )
} catch (error) {
res.send(error)
}
next()
})
But if I use with restify-router, I get this wrong
Argument of type 'RequestHandler' is not assignable to parameter of type 'RequestHandlerType'.
Type 'RequestHandler' is not assignable to type 'RequestHandler'.
Types of parameters 'req' and 'req' are incompatible.
Type 'Request' is missing the following properties from type 'Request<ParamsDictionary, any, any>': get, acceptsCharsets, acceptsEncodings, acceptsLanguages, and 20 more.ts(2345)
Is possible to do upload with restify-router?
@cbcarlos07 could you test this with the latest version? @otaviotech added some declarations to support this.
@cbcarlos07 could you test this with the latest version? @otaviotech added some declarations to support this.
Of Multer or restify-router?
of restify-router