Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload file with multer #23

Open
cbcarlos07 opened this issue Mar 11, 2020 · 3 comments
Open

Upload file with multer #23

cbcarlos07 opened this issue Mar 11, 2020 · 3 comments

Comments

@cbcarlos07
Copy link

cbcarlos07 commented Mar 11, 2020

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)

issue

Is possible to do upload with restify-router?

@ukayani
Copy link
Owner

ukayani commented Jul 21, 2020

@cbcarlos07 could you test this with the latest version? @otaviotech added some declarations to support this.

@cbcarlos07
Copy link
Author

@cbcarlos07 could you test this with the latest version? @otaviotech added some declarations to support this.

Of Multer or restify-router?

@ukayani
Copy link
Owner

ukayani commented Jul 22, 2020

of restify-router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants