This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Save /Open option for file download  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am using TOMCAT webserver and my application has file upload and download feature.Here, for each file(once uploaded),I need to provide 2 links. [download] and [View]....."download" option should give the user the option to save/open the file...and "view" option should open the file directly in th current browser...

When I use <a href="filename">download</a>, the file gets open in the browser directly...This is desired when I click on "View" but not on "Download"...How can I achieve both...Please help me...

Regards
KSPShenoy
 
Bartender
Posts: 9462
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that is browser behavior determined by the MIME type of the data. There is certainly no way to control it from the IO stream perspective. I'm going to toss this over to the HTML forum and see if they have any input.
 
author
Rancher
Posts: 15385
6
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!