Place the files in your app folder but outside of webroot. Then create an action that people can use to access a file.
http://example.com/downloads/get/myfile.zip Then, either try using the MediaView [1] (as long as your mimetype is supported) or build you own simple file reader (look into readfile()). [1] http://book.cakephp.org/view/489/media-views On Wed, Jun 25, 2008 at 9:37 AM, Petra Meier <[EMAIL PROTECTED]> wrote: > > Hello, > > I use the Auth component to authenticate my users (using a sql > database). > On apache I do not have any authentication. everything works fine. Now > I have to add files for download that only registered users may > download. how do I best do that? do I have to "duplicate" > authentication? I dont want these apache popups when loggin in but to > keep my nice form based login. (do i have to use the 404 page as login > page then?) how wouldl you do that? > thanks you > Petra > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
