Problem – this file may harm your computer

Home \ forums/topic \ Problem – this file may harm your computer

Support Home Page Forums Joomla Software Advanced Folder Listing Component Problem – this file may harm your computer

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #712
    jamesh
    Participant

    I would like to make sure that all files that are downloaded from the Advanced Listing do not result in the following error:

    “This type of file can harm your computer. Do you want to keep…”

    As this is preventing the PDFs from being viewed first.

    Example: http://www.spc.int/prism/solomons/index.php/sinso-documents

    Many thanks for any information you can provide.

    James

    #1920
    Michael Gilkes
    Keymaster

    @jamesh. Thanks for posting. I don’t know what you are referring to exactly. I went to the link that you posted and clicked the download icon and it downloaded without any message. The message that you quoted is not included anywhere in the Advanced Folder Listing code. It seems to me that this message is probably from your browser’s download manager. It seems like a standard warning that a browser’s download manager may give. Providing a screenshot of this message being displayed would probably reveal its source.

    #1921
    jamesh
    Participant

    Thanks for getting back to me so quickly Michael.

    It is indeed from the Chrome browser download manager – not trusting the link:

    The warning appears when I try to download any of the PDFs by clicking on the save icon. Each save icon has a link like this:

    http://www.spc.int/prism/solomons/index.php/sinso-documents?view=download&fileId=11

    Whereas if I create a link directly to the PDF then no warning message occurs.

    I am unable to upload a screenshot – but you should receive the warning message, when clicking on the link above.

    Does this have something to do with permissive file handling?

    Many thanks,

    James

    #1922
    Michael Gilkes
    Keymaster

    @jamesh. I tried it on both Safari and Chrome. I didn’t get the warning. However, it is probably some setting in your browser that triggers the message. But there is nothing in the extension that relates to the warning, as far as I know.

    BTW, to share a screenshot, all you need to do is to upload it to a file sharing site, such as imageshack.us and post the link in this forum.

    #1923
    jamesh
    Participant

    OK thanks Michael for this.

    If you take a look at these two links:

    http://www.spc.int/prism/images/Advancing_Stat_dvlpmt_in_the_pacific_26_11_2013.pdf

    http://www.mfem.gov.ck/mfemdocs/stats/1-statistics/1-economic/3-international-trade/160-trade-december-qtr-2012/file

    I would like this behaviour (i.e. viewing the PDF within the browser).

    Rather than any of the links from here:

    http://www.spc.int/prism/solomons/index.php/sinso-documents

    Which forces the user to save rather than automatically viewing in a browser.

    Thanks very much,

    James

    #1924
    jamesh
    Participant

    Here is a good example of accessing the same exact document via a non-advanced listing:

    http://www.spc.int/prism/images/PACCOICOP_2012.pdf

    And here is the same document accessed through the advanced listing:

    http://www.sbs.gov.ws/index.php?option=com_advlisting&view=download&fileId=16&Itemid=157

    – please let me know if you can reproduce.

    Many thanks,

    James

    #1925
    Michael Gilkes
    Keymaster

    @jamesh. Have you tried the preview feature? It uses Google Docs Viewer to allow the user to preview pdf files.

    Currently, the download feature downloads directly. This happens because the actual file location is not used in the link. With the actual file location, the browser chooses to show the file in a browser.

    Now, you should be able to change this behavior by editing the following file: components/com_advlisting/views/download/tmpl/default.php on line 130, and change it to:

    Basically, it is changing the Content-Disposition from “attachment” to “inline”. Now, I haven’t tested this, but it *should* work. Let me know.

    #1926
    jamesh
    Participant

    Excellent! That’s exactly what I needed. Works now like a dream.

    Many thanks,

    James

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Problem – this file may harm your computer’ is closed to new replies.