Uploads Module setting

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
beaconhill
New Member
New Member
Posts: 3
Joined: Mon Jun 29, 2015 11:39 pm

Uploads Module setting

Post by beaconhill »

Using Uploads Module V1.25.1 on CMSMS V2.1.5 (latest of both).

I have a summary template showing a list of PDF files that were uploaded using the Uploads Module.
When clicking to view one of these PDF files it first downloads itself before opening locally.
Is there a setting I can tweak that will stop the PDF from downloading before it opens.

IE, the PDF opens file:///C:/Users/Owner/Downloads/my_PDF.pdf
and I need it to open
http://www.mydomain.com/uploads/files/my_PDF.pdf
Thansk you in advance.
Neil
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Uploads Module setting

Post by velden »

This probably is a setting in the local browser.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Uploads Module setting

Post by Rolf »

You tried using the html5 download tag https://www.w3schools.com/TAGS/att_a_download.asp

Code: Select all

<a href="{$entry->download_url}" title="{$entry->name}">{$entry->name}</a>

Code: Select all

<a href="{$entry->download_url}" title="{$entry->name}" download>{$entry->name}</a>
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
beaconhill
New Member
New Member
Posts: 3
Joined: Mon Jun 29, 2015 11:39 pm

Re: Uploads Module setting

Post by beaconhill »

Hi Rolf and thanks for your input.
Unfortunately its not a browser setting as links to PDF generated outside of the module behave differently when clicked.
See the issue in action here http://server.beaconhilldesign.co.nz/~kevinmcdonald/
Click on the folder icon to open the fly out menu.
The list starting with "Buying a house" has been created using the Uploads Module. Clicking on any of these will result in the PDF being downloaded locally first (not what we want).
The link above called "link created outside of the module" has been hard coded into the page and behaves as it should.
My guess is that its a header created by the module however I have no idea as to where I should begin to look.
Thanks again,
Neil
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Uploads Module setting

Post by velden »

Probably you're right about the header. Not sure how to solve it (I'm not familiar with the Uploads module).

BTW: I can't find your "link created outside of the module" link in the page.

What is your goal using this module? Just offering the downloads to every visitor, or are you using some fancy features?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Uploads Module setting

Post by velden »

Checked the source and this module is explicitly forcing a download (by http headers).

You might want to use the 'origfile_url' property of the items but note it might not do what you want (perhaps changing filename, revealing location, skip tracking/analytics, make it public, indexed by search engine etc etc)

Code: Select all

{$entry->origfile_url}
Another option would be to do ask the developer of the module if he's willing to extend the module to include extra header options/settings. It might need sponsoring but that's for a good cause, right? :-)
beaconhill
New Member
New Member
Posts: 3
Joined: Mon Jun 29, 2015 11:39 pm

Re: Uploads Module setting

Post by beaconhill »

Hi Velden,
that you so much for the information. I have asked our developer (based on what you have said) to investigate adding the additional header information via the module.
More than happy to close this question.
Best,
Neil
PS: I needed to remove my test link as the site went out to the client for approval yesterday. Apologies if this caused any confusion.
Post Reply

Return to “Modules/Add-Ons”