• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Downloading and saving/opening a file

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to all...

i have written a code for just viewing a binary format file stored in a database when view button is clicked. It is working properly..giving the desired result..when server is running.

Later i wanted to modify the code..to ..not only to view the image or file..etc. but give an option to save the file to the local system.But it is not happening...But, to my amazing..after stopping the server(tomcat)...

Opened the source code file in edit plus..then pressed ctrl+B(to see in browser view) then it is giving a option to save or open the file.After saying it to save it is saving the source file..how it is happened i dont know..but i want to know how and why it happend...by knowing the reason ..i can use the same concept..for saving the file..

Here i am placing the code..please help me out..please.




Thanks to all..
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the Content-Disposition header, you can suggest that the browser either show the content 'inline' or have it sent as an 'attachment'.
The latter will cause the save/open dialog to be opened up with most browsers.

 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben...for your reply..


ben..you mean to say..Attachment..in the set header( )...will allow me to give option to open/download...
reply
    Bookmark Topic Watch Topic
  • New Topic