play m4a or mp3 within article

Phoca Download - download manager
nicovanleeuwen
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 23 Jun 2020, 09:31

play m4a or mp3 within article

Post by nicovanleeuwen » 23 Jun 2020, 10:42

Hi,
I'm trying to make documents and mp3/m4a files available only for registered visitors.

My first attempt was to use a folder outside of the public_html but after some digging found out this is not working as explained also in this post viewtopic.php?f=31&t=61073&start=10.

Now I'm a bit lost trying to find a solution where the files are not visible from outside the website by direct link but with the ability to play the mp3 files.

Would this be even possible? And if so, could somebody give me a hint on how to make this work?
I'm a bit lost in documentation :-)
Thanks,
Nico

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

Re: play m4a or mp3 within article

Post by Jan » 23 Jun 2020, 23:07

Hi,

if the files should be protected, they are mostly moved behind the public_html, so they cannot be played or previewed. This is why Phoca Download includes two files, one for download, second for play and preview. Play and preview files are set in standard folder (so they can be downloaded and previewed) and files for download are stored behind the public_html, so only e.g. logged in users can download them:

https://www.phoca.cz/documents/17-phoca ... ng-folders

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

nicovanleeuwen
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 23 Jun 2020, 09:31

Re: play m4a or mp3 within article

Post by nicovanleeuwen » 24 Jun 2020, 10:31

Just a last question: would this be possible with some custom work?

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

Re: play m4a or mp3 within article

Post by Jan » 06 Jul 2020, 12:09

Just a last question: would this be possible with some custom work?
But what exactly do you mean. Phoca Download just follows the basic standards of internet:

- files behind the public_html cannot be accessed by internet (only download - served by PHP script which just manages the access rights)

- files before the public_html can be accessed by internet so they can be played and previewed.

So one type of files (behind public_html) is convenient to use as protected download, one type of files (before public_html) is convenient to use as public accessible file (play and preview). And Phoca Download just use both of types.

So the question is what exactly should be customized and what is the goal of this customization?

If to access files behind the public_html by public internet users, then it is against the common internet and security "laws" so such needs to be asked by "managers" of common internet/servers rules. :idea:

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

Post Reply