I'm working on an application using ASP.NET MVC and AngularJS and need to ensure that the file upload will be just image files, even if someone sends an extension of another type of ".jpg" for example.
I'm getting a MultipartFileData in the backend.
I have tried to check the contentType of the header file, but for example, if I change the length of a text-to-image file, the contentType in> will still show that it is "image / png".
Is there an easier way to ensure that the user only selects and sends true images? (jpeg, jpg, png, bmp, etc.).