Tuesday, February 22, 2011

media view

Hello,
I am trying to use the MediaView class to set a download of pdf file.
So far my attempts are not working and I can't seem to find any fault
in my code copied from the book.cakephp.org website. Any help or
thoughts will be appreciated.

Find sample code below:


$this->view = 'Media'; //set to media download
$params = array(
'id' => 'catalogue.pdf',
'name' => 'new_catalogue',
'download'=>true,
'extension' => 'pdf',
'path' => $this->webroot . 'files' . DS );
$this->set($params);

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate