Hi guys I'm a new baker, I guess I'm better at cooking.
I tried to use the upload behavior 1.3 ( http://bin.cakephp.org/saved/21813# ) but it didn't upload anything. There are no debugging messages or errors either, so I dont know what else to do. I tried using other versions of this behaviour and the results are the same. Everything I upload fills the Image table with filename: Null, mime type: Null, filesize: Null. Only datetime created and datetime modified are populated correctly. Also, no file appears on the directory, This is my MODEL: class Image extends AppModel { var $name = 'Image'; var $actsAs = array('upload' => array('image' => array('dir' => 'photos', 'overwrite_existing' => true, 'create_directory' => true, ))); } This is my CONTROLLER: function upload() { if (!empty($this->data)) { if ($this->Image->save($this->data)) { $this->flash('image added','/images'); } } And this is a VIEW I called upload.ctp <?php echo $html->formTag('/images/upload/','post', array('enctype'=>'multipart/form-data') ); ?> <p> add photo <?php echo $html->file('Upload/filename', array('size'=>'80') )?> <?php echo $html->tagErrorMsg('Upload/filename', 'You must specify a path on your disk') ?> </p> <p> <?php echo $html->submit('Upload') ?> </p> What could I be doing wrong? XOXO Anna --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
