Absolute path

Phoca Download - download manager
PowerJoe
Phoca Member
Phoca Member
Posts: 37
Joined: 03 Sep 2015, 19:00

Absolute path

Post by PowerJoe »

Hi Phoca,

I used the Absolute path setting in the Options for PhocaDownload.
It's set to the public_html but the "File - Preview" section in the General settings for Files doesn't go to the root of the public_html instead it remains on the default path. So I copy pasted the link in the field and saved it. Now when opening the file in "view" on the front-end of the website I get a 404 error. Am I missing something?

Hoping someone can guide me in the right direction.

Thanks in advance.

PJ 8)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Absolute path

Post by Jan »

Hi, Preview and Play files do not have own specific path (because for example files cannot by played or previewed behind the public_html). File for play and preview do have own folders and such cannot be changed like for the download files :idea:

Jan
If you find Phoca extensions useful, please support the project
PowerJoe
Phoca Member
Phoca Member
Posts: 37
Joined: 03 Sep 2015, 19:00

Re: Absolute path

Post by PowerJoe »

Hi Jan,

Would it be possible to allow viewing of the PDF but not the downloading of it?

Thanks in advance.

PJ
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Absolute path

Post by Jan »

Hi, I don't understand now. When user views the PDF it is in fact download in his/her PC. If you want to hide the download button, the best way is to use CSS for this purpose :idea:

Jan
If you find Phoca extensions useful, please support the project
PowerJoe
Phoca Member
Phoca Member
Posts: 37
Joined: 03 Sep 2015, 19:00

Re: Absolute path

Post by PowerJoe »

Hi Jan,

What I mean is, I want the script to be able to pull the view of the PDF from outside the public_html so that it restricts the user from actually downloading the file. Is this possible?

Thank you! PJ
christine
Phoca Hero
Phoca Hero
Posts: 2857
Joined: 28 Nov 2010, 17:20

Re: Absolute path

Post by christine »

Hi PJ,

the only idea I have, could be: Symlinks. Provided, FollowSymlinks is activated in .htaccess (and/or SSH) and accepted by your hoster to use ist.

https://www.siteground.com/kb/how_can_i ... olic_link/
https://www.hostinger.com/tutorials/how ... -in-linux/
in german: https://blog.k-webs.ch/2016-01-symlinks ... ellen.html

Kind regards
Christine
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Absolute path

Post by Jan »

Hi,

file behind the public_html cannot be directly access but only with script. So the script can access this file and can give it for download. The preview and play funtion in Phoca Download produces direct link to play or preview the file but such file cannot be behinde the public_html.

This means if you have e.g. file MP3 and it should be played and this is done with audio html tag, it must just include link which is accessible in internet - you cannot use a link behind the public_html.

So for now I don't know how to make public playing or previewing of files which are behind the public_html, really hard to say. So no clue advice there :-(

Jan
If you find Phoca extensions useful, please support the project
Post Reply