Sometimes It's The Most Stupidest Thing

Laughing really hard writing this, I had a task a couple of weeks back to build a feature that helps this business add products to their marketplace. While working on it I got stuck trying to build a functionality to help them upload multiple images. Two hours gone and I could not find a fix, and the craziest thing is that I had just worked on the same functionality for another business just the previous  week. So what was the issue? I was using the @UploadedFile() to upload multiple images, what I should have known is that there are two decorators to use when uploading using NestJs. @UploadedFile() when you want to upload a single file, and @UploadedFiles() when you want to upload multiple files. So I suffered for two hours because of the letter s.

I learned a very important lesson that day, I need to pay more attention to details when coding. I had copied a file upload solution from Phind.Ai but I did not bother to read up on the explanation or even noticed that NestJs had two different decorators to handle file upload. I just went ahead and used the solution provided and it took me two frustrating hours to figure out why my uploads were not working as they should. 

If you find yourself in a similar situation, probably chill, relax, drink water, it might just be an s.