You have an application assigned to automatically open the file in a browser plug-in for word or pdf. This is a brower specific option. For Firefox go to Tools->Options and click on the applications tab. You should see 'Adobe Acrobat x.x Document' and a dropdown next to it displaying 'Use Adobe Acrobat (firefox).' You can then choose from the dropdown to save file, or always ask. At some point you probably click 'always open in browser' option when you downloaded a file. There are similar options for other browsers.
I've done something like this earlier, but I did it using a proxy url like example.com/download.aspx?file=/media/1234/myfile.pdf
Then I change the header like Petr suggests above. Try and do a search for "C# APPLICATION/OCTET-STREAM" and that should get you some samples.
As far as I recall, there was some certain parameters I had to set in order to get it working with adobe 7. Otherwise it would see the file as corrupted, but I no longer have the code with me. Just remember to test it across adobe versions.
File download dailog when pdf/doc links are clicked ?
Hello,
I am using a upload datatype and am uploading pdf and doc files to my content section.
In my xslt i am creating the links for the pdf and doc files and am calling the respective macro in the template.
When i click on those links in the user-side i am unable to get the File Download dailog box ,rather the pdf/doc are directly opening in a window.
Can anyone help me out regarding this issue..
Thank you
You have an application assigned to automatically open the file in a browser plug-in for word or pdf. This is a brower specific option. For Firefox go to Tools->Options and click on the applications tab. You should see 'Adobe Acrobat x.x Document' and a dropdown next to it displaying 'Use Adobe Acrobat (firefox).' You can then choose from the dropdown to save file, or always ask. At some point you probably click 'always open in browser' option when you downloaded a file. There are similar options for other browsers.
Hope that helps,
Chris
If you don't want be browser dependent, you can create handler, which first send content-disposition header. For more info try look at http://stackoverflow.com/questions/336345/c-asp-net-3-5-content-disposition-file-download-problems or try google.
Petr
I've done something like this earlier, but I did it using a proxy url like example.com/download.aspx?file=/media/1234/myfile.pdf
Then I change the header like Petr suggests above. Try and do a search for "C# APPLICATION/OCTET-STREAM" and that should get you some samples.
As far as I recall, there was some certain parameters I had to set in order to get it working with adobe 7. Otherwise it would see the file as corrupted, but I no longer have the code with me. Just remember to test it across adobe versions.
is working on a reply...