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
Uploads Module setting
Re: Uploads Module setting
This probably is a setting in the local browser.
Re: Uploads Module setting
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
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
-
beaconhill
- New Member

- Posts: 3
- Joined: Mon Jun 29, 2015 11:39 pm
Re: Uploads Module setting
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
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
Re: Uploads Module setting
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?
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?
Re: Uploads Module setting
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)
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? 
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}-
beaconhill
- New Member

- Posts: 3
- Joined: Mon Jun 29, 2015 11:39 pm
Re: Uploads Module setting
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.
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.


