Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servletOutputStream  RSS feed

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!