I allow files to be uploaded to my C # MVC website, I restrict these types based on the extension at the moment, but also feel like I need a server side check to confirm that they did not just rename it.
Is there a way that I can use to check all the types that I need, or a library that I can use that will help here?
I saw people checking the first few bytes of a file, but am I afraid that I will miss something?
Thank you for your help.
Edit:
Many suggestions are presented here. I will explore some of them as a solution.
source share