File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IE Mime type resolution?

Alok Pota
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to force IE to always download a file when streaming
its contents to it?
I have the following code...

res.setDateHeader( "Last-modified", file.lastModified());
res.setHeader("Content-Disposition", "attachment; filename=" + file.getName());
and if the file happens to be a txt file or textual in nature IE
renders it in-line (sometimes) and sometimes it shows the download box
Is there a definitive way to make it pop up the Save As box everytime.
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic