• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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: 9509
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!