On Feb 5, 11:16 am, newguy <[email protected]> wrote: > I have a display page with follwoing 4 links: > > <p>Select the game to download</p> > <ul> > <li><?php echo $html->link('Game 1',array('action'=>'download')); ?></ > li> > <li><?php echo $html->link('Game 2',array('action'=>'download1')); ?></ > li> > <li><?php echo $html->link('Game 3',array('action'=>'download1')); ?></ > li> > <li>Game 4</li> > </ul> > > On clicking each link a different file should be downloaded. > > I am using Media View to dlownload file placed on my disk but since > the file name is hardcoded I am able to download only one file through > the download fucntion, I want to know that is it possible that I just > pass the name of the file to be downloaded(depending on the link > clicked) to the download function of media view and the respective > file is downloaded(extension of all files is zip). > > Heres my controller code: > > function download () > { > $this->view = 'Media'; > $params = array( > 'id' => 'example.zip, > 'name' => 'example', > 'download' => true, > 'extension' => 'zip', > 'path' => APP . 'gamefiles' . DS); > $this->set($params); > } > > Guys am new here so please help me witha little more explanation than > usual.
3 tips 1 don't create duplicate threads - that's really irritating. 2 how is your question any different than you want to view post 1, 2, 3 of the blog tutorial? 3 the media view file is written in php - you can debug it. AD -- 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 [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
