Tell us what’s happening:
I am kinda stuck in the last project of the API and Microservices curriculum, which is supposed to receive a file upload, “parsing” it using multer, and return a JSON response with the filename. the type and the size in bytes. Now, my tests are identical to the website set as example by freeCodeCamp, and the response is also identical. I provide a home route with an html file where there is a form, the input field has the name that is required by FCC, when the file is uploaded it gets a correct routing and a response is sent back with the correct information. However, FCC tests keep failing, basically, all of them and I don’t know why. It is quite tricky to debug since I have no idea what the problem is because the test doesn’t really return anyhting readable or useful for debugging.
I understand that my project is on localhost but it has worked fine so far for the other projects so I don’t think that is the problem. I use morgan as logging middleware and I can see that there is a POST request to the api for uploading the file and the status code is 200. So, I am really out of ideas, could anybody help me please?
Your project link(s)
This is the GitHub link for the project: GitHub - BeGeos/file-metadata-microservice-FCC: FCC project for API and MIcroservices, file uploads
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Challenge: File Metadata Microservice
Link to the challenge: