Hey,

in my app I have some type of file uploading, and also downloading.
I'm using Cake's Media View, so I can send the file to the user after
authenticating that he/she is allowed to get that file.

So I was wondering, is there any chance to COUNT these downloads? All
I have in my action is a view-like action which sets the params. I
could then just save a counting value to my databse, but I think
that's not really the way to go...

(basic usage of the media view...)

        $this->view = 'media';
        $params = array(
              'id' => $file['Upload']['hash'],
              'name' => $file['Upload']['name'],
              'download' => true,
              'extension' => $file['Upload']['type'],
              'path' => APP . '/uploads/'.$modelpath.'/'
       );
       $this->set($params);

Is there any kind of callback or so after a user has successfully
downloaded a file?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to