Hi,
I try to avoid that my newsletters can be accessed from internet directly (from unregistred users).
On the setting of the folders https://www.phoca.cz/documents/17-phoca- ... ng-folders, it says :
'Absolute Path - you can set absolute path to download folder. If this parameter is set, then the Download Folder (see above) parameter is ignored. With help of this parameter you can set the download folder to be placed outside public_html folder. This means, that your files cannot be accessed from internet directly, only per script set on your site. Such files can be downloaded by Phoca Download component but cannot be accessed directly from the internet.'
Do you have a model for the script ? And how to use it ?
The pdf files are stored in a file called 'newsletter', at the same level than the file 'www' on the server.
Thanks
Script when absolute path is used
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Script when absolute path is used
Hi, not sure what you exactly mean? When you set the path customized for your server and it is will set behind public_html, then downloadable files cannot be accessed directly on your server 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 12 Apr 2016, 23:16
Re: Script when absolute path is used
Hi Jan,
To avoid direct download with the url, the newsletters are on the server, outside the file where the joomla site is store ('www').
On filzezilla, the files look like that
"/
..
newsletter
www"
In an article, the following code for the Phoca Download Plugin gives access to the view of the pdf with the category "newsletter" :
"<p>{phocadownload view=category|id=1}</p>"
So when you are registred, you can select on newsletter pdf and see under a "download" button.
But when you click on the button, there is an error message :
"Error while downloading file File not found on server"
I don't know how to write the script for the "download" button.
But there should be a way to download the file with the Phoca Download Plugin as "... files cannot be accessed from internet directly, only per script set on your site. Such files can be downloaded by Phoca Download component but cannot be accessed directly from the internet."
Any idear ?
Thanks
To avoid direct download with the url, the newsletters are on the server, outside the file where the joomla site is store ('www').
On filzezilla, the files look like that
"/
..
newsletter
www"
In an article, the following code for the Phoca Download Plugin gives access to the view of the pdf with the category "newsletter" :
"<p>{phocadownload view=category|id=1}</p>"
So when you are registred, you can select on newsletter pdf and see under a "download" button.
But when you click on the button, there is an error message :
"Error while downloading file File not found on server"
I don't know how to write the script for the "download" button.
But there should be a way to download the file with the Phoca Download Plugin as "... files cannot be accessed from internet directly, only per script set on your site. Such files can be downloaded by Phoca Download component but cannot be accessed directly from the internet."
Any idear ?
Thanks
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Script when absolute path is used
Hi, when using Phoca Download plugin, it has no access management - it is a part of article and the article should have access management - means - if you want, e.g. public will not see the link inside the article, then make the article not accessible.
Access for files is managed in component, not in plugins (article) - there the rules for article are valid.
Jan
Access for files is managed in component, not in plugins (article) - there the rules for article are valid.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 12 Apr 2016, 23:16
Re: Script when absolute path is used
Hi,
Thanks for the answer. I will see if I can manage to configure that on my website.
At first look, it seems that when someone is registered, he gets access to the article where are the newsletters. He can then provide the url on this article to someone else who will able to download the newsletter without registration.
Thanks
Thanks for the answer. I will see if I can manage to configure that on my website.
At first look, it seems that when someone is registered, he gets access to the article where are the newsletters. He can then provide the url on this article to someone else who will able to download the newsletter without registration.
Thanks