This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

POPING UP save/open option WHILE DOWNLOADING  RSS feed

 
mou haj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help
I want to download a txt file or may be any file from server.I want to pop up a save / open option before downloading.For this i guess i have to set the mime type
I have done like this
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="application/x-filler">
Do i have to do anything else??
coz this is opening the txt files in the browser itself
Thanks a lot
Moumita
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens to a file sent to a browser depends on the Content-type and the browser. The browser maintains a list of MIME types (content types) and uses that list to determine what action to take.
You can use the Content-Disposition header to hint that the normal handling should be overridden. Most modern browsers will take the hint.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!