Hi,
I allow my users to upload avatar images (google app engine, java). I don't know what image type it is when they upload. I'm just storing whatever they give me in their submission form. I'm following the example here:
http://code.google.com/appengine/docs/python/images/usingimages.html
Is there a way to check what image type it is before storing it? For example, if they submit a text file, I don't want to accept it.
Also, how would I change the content type when serving the image back? I need to know what image type it is, in order to set the content type correctly?:
resp.setHeader("Content-Type", "image/jpg");
I am using java,
Thanks