Page 1 of 1

play m4a or mp3 within article

Posted: 23 Jun 2020, 10:42
by nicovanleeuwen
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

Re: play m4a or mp3 within article

Posted: 23 Jun 2020, 23:07
by Jan
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

Re: play m4a or mp3 within article

Posted: 24 Jun 2020, 10:31
by nicovanleeuwen
Just a last question: would this be possible with some custom work?

Re: play m4a or mp3 within article

Posted: 06 Jul 2020, 12:09
by Jan
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