Hi, I'm using a servlet to extract files from a content management app. People click the link and call my servlet that sets the response.setContentType to image/jpg , problem is that I get the Open From location or download to file box. I've tried with gif, png and pdf and it works correctly. What's the problem?
Don't ever let your computer know you're in a hurry! :nono:
posted 12 years ago
The bit you have missed is that the correct mime type is image/jpeg Although you may wish to store the file as something.jpg, you should always check if the mime type is different from the file extension.