I have completed the File Metadata Microservice Challange in API and Microservices course. But when I submit my solution link I am getting following two test fail causes crankily:
You can submit a form that includes a file upload.
The form file input field has the name attribute set to upfile .
Everything seems ok as you can see in my source code. I cannot understand the problem. Thanks in advance for your help!
When I do that, the last test fails with this error:
POST https://elvinbashirlisportfolio.herokuapp.com/file-metadata/api/fileanalyse 404 (Not Found)
SyntaxError: Unexpected token < in JSON at position 0
I have not dug, but my best guess is, with your current structure, your routes are not correct. Specifically, I suspect you need have a route /api/fileanalyse, but not the needed /file-metadata/api/fileanalyse.
You have 2 options:
Refactor to have the route /api/fileanalyse target just the file-metadata page (simple one-liner middleware)
Add /file-metadata to the beginning of the route
Now that I say that, they are doing the exact same thing, but for multiple routes, you would want to do 1.
Thanks for contributing.
I used the same code for all other 4 porject, so that I wrote all projects as a single one. It has worked for all other 4, but not last one. The link that I provided passes even the first and last tests but not middle ones.
I solved the problem by writing it in Repl.it and providing link from it. But stil Iād like to solve with this link and see what is wrong.