I have a set of files stored in a protected directory on my project's 
server.  I need my Cake app to send files to users, however due to 
security reasons, I can't just use a redirect that points the web 
browser to the appropriate file.

My code takes a parameter from the submitted URL, checks if the user is 
allowed to access the file and if successful sends the file to the user.

It is the last part of this that I can't figure out.

Can anyone point me to example PHP code or something Cake specific for 
reading a file from disk and returning it to the user without parsing 
the file?

I have spent some time searching and trying things with no luck so far.

For instance, using get_file_contents() in an empty view results in 
corrupt files being returned to the browser.

Any suggestions greatly appreciated.

Regards,
Langdon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to