[Pro] Force Download action failing

Hi,

I have a few PDF’s that I’m putting as downloads onto my site. The PDFs have security on them (password, printing set to now, etc) to try and cut down on them being passed around. I’ve used CPanel to secure a directory on my server and set up a page of my site within with directory. I did this by creating another folder within my freeway site called ‘secure’, created the page within this folder, uploaded and through CPanel set security options on it (username + password). This works fine when visited, the site stops and asks for a username and pass, then proceeds to my ‘downloads’ page I’ve created.

Each PDF on this page has the Force Download (PHP) action applied to it to ensure the PDF downloads rather than open in their browser (to stop them printing it off). But, when a user clicks to download I get an error (404 page not found). If I try the Graphic link to file/PDF action, it works fine, but the browser takes over and opens the PDF (not download it).

I have PHP enabled on my hosting package (I use a contact form that works fine). My question is: why does the Force Download action not work in the secure area?

Thanks,

Neil.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Anyone?! Pleeeeease?!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If the Action is broken, you could try contacting the author directly…

A quick google of “force download file” finds many articles on setting the
.htaccess server file to achieve results…


Ernie Simpson

On Tue, Aug 14, 2012 at 9:14 AM, Neil email@hidden wrote:

Anyone?! Pleeeeease?!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi neil…
This is very easy alternative to using anything fancy
you probably know this already but if you don’t… zip up the pdf and then link to it as normal via the normal link method (cmd k) but in the link popup use the external tab, Use other dropdown Protocol and just type the address to the zipped up pdf.

that way it will always download the pdf.

Hope this gives you an alternative


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hey Neil, I hadn’t read your original post, just the thread title so now I
think I’ve not answered your question.

Barring any advice from the action author, I will say that sometimes FWP
has a difficult time understanding where files are. If your graphic links
DO download the file, but your text link DOES NOT, then it may be best to
analyze what the difference between the two links are.

For example, I generally have problems using Relative links (
href=“Resources/myfile.pdf” ). If I’m calling the link from a css file,
then it needs to be ( href=“…/Resources/myfile.pdf” ) which seems very
close but are worlds apart for the server which is including where the link
is called from in its calculations. If you can’t make the published text
links match the graphic ones, then try using Absolute links, which would
include the http: header and the full path to the file, as in ( href="
http://www.domain.com/subfolder/Resources/myfile.pdf" ).

Best wishes


Ernie Simpson

On Tue, Aug 14, 2012 at 9:50 AM, max email@hidden wrote:

Hi neil…
This is very easy alternative to using anything fancy
you probably know this already but if you don’t… zip up the pdf and
then link to it as normal via the normal link method (cmd k) but in the
link popup use the external tab, Use other dropdown Protocol and just type
the address to the zipped up pdf.

that way it will always download the pdf.

Hope this gives you an alternative


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi,

Many thanks for the replies. I’m afraid the .htaccess is a bit foreign to me! I did have a look but it’s not making much sense. I need to read up on it.

Regarding Max’s solution - I need to keep the file a PDF (not a ZIP) since the site will (generally) be used by elderly people that are not technically minded (not everyone old would struggle might I add!), and they are expecting a simple PDF. What I don’t get is the force download action works fine ‘outside’ my secure folder, but as soon as the action is applied to the PDF ‘inside’ the folder and uploaded, the site says it’s not there even though I know it is.

I think I’ll have to contact the action developer and give it a try!

Many thanks for your help though.

Neil.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Ernie,

Sorry replied before I’d read your new post! I need to have a sort out of files on my server and see the exact path freeway or the action is taking to get to the files. Strangely Freeway (or the action) uploads the file twice - once loose inside the ‘Secure’ folder and again inside a resources folder within the Secure folder. I need to double check the link to both.

I asume If I make it a standard Freeway link, without the action the browser will simply open the PDF (not download) so I need to get the action working.

I’ve asked Tim who made the action so I’ll also see what he says, but will take a better look at all the exact paths to see if I can see where the error lies.

Many thanks for the help so far, it’s really appreciated.

Cheers,

Neil.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The Force Download Action places the download files in the same folder as the HTML file that is requesting them. If your security script is set up to protect that folder, then it should all just work. If your security settings are for the Resources folder in that folder, then you need to move them up a level.

Walter

On Aug 13, 2012, at 7:35 AM, Neil wrote:

Hi,

I have a few PDF’s that I’m putting as downloads onto my site. The PDFs have security on them (password, printing set to now, etc) to try and cut down on them being passed around. I’ve used CPanel to secure a directory on my server and set up a page of my site within with directory. I did this by creating another folder within my freeway site called ‘secure’, created the page within this folder, uploaded and through CPanel set security options on it (username + password). This works fine when visited, the site stops and asks for a username and pass, then proceeds to my ‘downloads’ page I’ve created.

Each PDF on this page has the Force Download (PHP) action applied to it to ensure the PDF downloads rather than open in their browser (to stop them printing it off). But, when a user clicks to download I get an error (404 page not found). If I try the Graphic link to file/PDF action, it works fine, but the browser takes over and opens the PDF (not download it).

I have PHP enabled on my hosting package (I use a contact form that works fine). My question is: why does the Force Download action not work in the secure area?

Thanks,

Neil.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I all,

Well, I deleted the contents of the secure folder completely and did a fresh upload with just one file to see exactly where Freeway was putting the PDF. And as Walter explained, it sits inside the Secure folder loose, not inside the additional resources folder Freeway creates in there.

Uploaded and tested again, and voila, it works. No clue what I did differently. Don’t you hate problems like that?

A big thank you to all for your help on here, it’s really appreciated and it’s great I have people to turn to when things go wrong.

Thanks again everyone.

Neil.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options