Well, this is gonna be tricky. Ideally, they are simply served from the
public directory. But if you want to add some level of access control
around them, you'll need to put them outside of the public/ directory,
and wrap the download in a PHP script that will do your access control.
Normally, I'd say to do this inside a controller, but Video files can
get large. In addition, by using the Zend_Controller request, it will
output-buffer the output by default.. Which might cause problems.
Your best bet is to do a downlaod.php script, and do something similar
in here, example 1:
http://php.net/manual/en/function.readfile.php
In the script, you'll have to do some kind of quick access control, like
checking Zend_Auth for a user, or even perhaps checking the cookie
against your database.
Hope that helps,
Ralph
Kuzma wrote:
Hello!
I've tried to search for the solution or any information about this question
but I haven't found anything.
The problem is:
I have a page which loads JS video player which plays video files from the
public folder to all users:
as example video/id/xx/main.flv
But I need, that logged in users can see and another video files which are
secured. In other words that someone won't download files directly.
I understand that this files must be put outside public folder but in this
way I don't understand how to generate links to player.
Thank you!