Closed the-yadu closed 4 years ago
Hi. Can you please provide a reproduction repository here on GitHub so I can start further investigation using your setup?
Hmmm... Interesting As asked by you, I started making a reproduction repository with single file server.js and a single route to upload the file.
and I uploaded it without any issue. Strange. This got me thinking to do the same for my project.
I use fastify-autoloader to load the routes dynamically.
Then, I tried replicating the same in my project, I took the upload route and got it inside server.js file in root directly and made a route directly with server object. IT WORKED
Guess there is some issue with autoloader combining with multer.
I am using postman to upload a file to the route using fastify-multer. It throws the below error.
{ "statusCode": 415, "code": "FST_ERR_CTP_INVALID_MEDIA_TYPE", "error": "Unsupported Media Type", "message": "FST_ERR_CTP_INVALID_MEDIA_TYPE: Unsupported Media Type: multipart/form-data; boundary=--------------------------566739000861921958655834" }