Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • npanguuluri 30 posts 57 karma points
    Jul 14, 2009 @ 02:21
    npanguuluri
    0

    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

  • Chris Dunn 75 posts 127 karma points
    Jul 14, 2009 @ 04:13
    Chris Dunn
    0

    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

  • Petr Snobelt 923 posts 1535 karma points
    Jul 14, 2009 @ 09:24
    Petr Snobelt
    0

    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

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Jul 14, 2009 @ 09:32
    Morten Bock
    1

    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.

Please Sign in or register to post replies

Write your reply to:

Draft