Link to PDF-files results in corrupt downloads

Home \ forums/topic \ Link to PDF-files results in corrupt downloads

Support Home Page Forums Joomla Software Easy Folder Listing Pro Plugin Link to PDF-files results in corrupt downloads

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #142
    Sinuce
    Participant

    Hi Michael,

    I just bought a copy of your EasyFolderListing Pro Plugin and it’s really brilliant.

    However, I’ve got an issue when “Link To Files” is set to “Yes” and I left-click a PDF-file-link in table display method.

    The file then downloads instantly and results in a 1 KB corrupted PDF-file.

    When “Link To Files” is set to “No” and I use right-click -> “save as…”, the PDF-file downloads correctly.

    I’m using Google Chrome btw.

    Can you help me?

    Best regards,

    Asger

    #1215
    Michael Gilkes
    Keymaster

    @Sinuce. Thanks for using my software, and for posting your issue. That is very interesting. I am not sure what would cause that. However, please read the following topic and try what I suggest. let me know if it works:

    http://support.michaelgilkes.com/topic/file-attachment-with-html

    #1216
    Sinuce
    Participant

    Thank you for the fast response =)

    I’ve followed your link and I’m currently trying to figure out how to force downloads, but it seems to be quite an elaborate process.

    Currently, I’m stuck trying to figure out where to find your mentioned “download.php” file and alter it.

    #1217
    Michael Gilkes
    Keymaster

    @Sinuce. No Problem. It’s actually not too difficult. download.php can be found in plugins/content/easyfolderlistingpro/

    When you find it, just open it in any simple text editor, like notepad, notepad++, text wrangler, and the like. Then change “octet-stream” to “force-download”.

    Let me know how it works out.

    #1218
    Sinuce
    Participant

    @michaelgilkes That makes sense. I was looking in my template folder and pretty much everywhere else than in the easyfolderlistingpro folder.

    I changed “octet-stream” to “force-download”. In the plugin I’ve set “Link To Files” to [Yes], “Link Target” to [_blank] and “Download Target” to [Link (overrides…)].

    Here’s the link to the site with your plugin: http://scan-in.dk/index.php/en/industrial-dosing/downloads

    When using “right-click -> Save as…” the PDF download works fine. But when left-clicking it still results in a corrupt downloaded file.

    #1219
    Michael Gilkes
    Keymaster

    @Sinuse. Sorry for taking so long to reply. Have a look at this post and let me know if it solves your problem: http://support.michaelgilkes.com/topic/corrupted-files#post-374

    #1220
    Sinuce
    Participant

    @michaelgilkes, wow that looks complicated. For now I’ll have to let visitors on my site live with right-clicking and choosing “save as…”.

    I’ll look into getting the force-download thing to work in the future.

    Thank you for your help 🙂

    #1221
    czmarco
    Participant

    Hi Michael,

    sorry, today, I downloaded and installed your Easy folder listing pro, and I have the same problem.

    If I select the link to the PDF-file the download is corrupted (0 byte), if I use right-click -> “save as…”, the PDF-file downloads correctly.

    Can you help me?

    Best regards,

    Marco

    #1222
    Michael Gilkes
    Keymaster

    @czmarco. Thanks for posting. Which browsers have you tried it with? Do you have the same problem with different browsers? Also, what server are you running?

    Oh, btw, did you check the link that I posted above?

    Some people have a similar problem in general, even when not using Joomla or my plugin. There is no set way to solve this so far. So, the more information I get about others with the same problem, the quicker I’ll be able to find a solution. So far, I haven’t been able to replicate the problem on my end, so it’s a little harder to solve. So, I have to depend on what others explain to me.

    Hope this helps.

    #1223
    czmarco
    Participant

    Hi Michael, this morning I solved the problem.

    I set the download target field to “None” and now it’s work corectly.

    We use joomla 1.6 on SLES 11 server and we use firefox on linux client and IE 6-7-8 on Windows client

    Thank you for your support.

    bye

    #1224
    janhan
    Participant

    Hi,

    had the same problem with corrupt pdf downloads and solved it this way.

    In the file “helper.php” I added the following two lines just above the “echo” statement.

    $thepath = parse_url($fullpath);

    $fullpath = ‘/home/MY_DOMAIN/public_html’.$thepath;

    You would of course have to use your real domain name instead of “MY_DOMAIN” and also modify the filepath as needed.

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Link to PDF-files results in corrupt downloads’ is closed to new replies.