Created
May 30, 2009 06:19
-
-
Save mariuswilms/120408 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class MoviesController extends AppController { | |
| function edit($id = null) { | |
| /* For a single upload */ | |
| $this->data = array( | |
| 'Movie' => array( | |
| 'file' => 'transferable item here' | |
| )); | |
| $this->Movie->save($this->data); | |
| /* For multiple uploads */ | |
| $this->data = array( | |
| 'Movie' => array( | |
| 0 => array('file' => 'transferable item here'), | |
| 1 => array('file' => 'transferable item here') | |
| )); | |
| $this->Movie->saveAll($this->data, array('validate' => 'first')); | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment