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.

Thanks

-- 
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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to