Friday, December 30, 2011

Re: Media view 1.3

set debug to 2 and you will see what's going wrong :)
--
Lep pozdrav, Tilen Majerle



2011/12/30 JTiki <jeremytiki@gmail.com>
I've recently been trying to get a media view up and running, but for
some reason I keep getting this Error "Error: The requested address '/
events/download' was not found on this server."
My controller code is below

function download () {
       $this->view = 'Media';
       $params = array(
             'id' => 'SalemFall2011Newsletter.pdf',
             'name' => 'SalemFall2011Newsletter',
             'download' => true,
             'extension' => 'pdf',  // must be lower case
             'path' => APP . 'webroot' . DS . 'files' . DS   // don't
forget terminal 'DS'
      );
      $this->set($params);
   }

Any ideas?

--
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

--
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

No comments: