I'm looking to handle image extentions .jpg, .png, .gif, etc. Essentially, what I have is a webserver that takes an image and archives it on the basis of its SHA-1. I use the git convention a1\b2\XXXXXX...
with the hex representation of the digest. My question is how is it best to store the extension in the database? Am I safest storing the MIME type? Or, the original file type? Or, should I just auto-generate the MIME each time? Should I store the mime-type the original client sent in the HTTP upload?
As a side note, does IE7+ handle images without file extensions? Is it safe to just send them out without them?
Any other advice on web servers and image types?