Hi folks.
I want to allow members of a site to upload images to a specific folder, the location of which is hardcoded.
I've got that part sorted OK, but it's very important that I be able to restrict the uploaded files to certain image types (GIF JPG/JPEG PNG BMP) and that the file uploaded really be an image file, and not something potentially dangerous like a renamed .exe.
Now I realise I could take the long route and parse the filename, extract the extension and filter on that, but it's my understanding that, for various reasons, this is an insecure solution, and that it's much more preferable to get the required information from the mime type.
And that's where I'm stuck. I'm just starting out with VB.NET and so not capable of coming up with this myself.
What I really need is a generic ready-made mime detector class, which I have searched widely for. I did come up with one, but the JavaScript downl ...
Go to the complete details ...