I didn't use the tag "enctype=multipart/form-data" Wasted a day of mine. So stupid...
On May 14, 9:41 pm, Stephen <stephen.j.t...@gmail.com> wrote: > Request: > item: { category_id: '1', item_name: adsfa, item_detail: adfad, > item_price: '34', pic1: avatar.php.jpeg, pic2: '', pic3: '', pic4: '', > link: ''} > > Globals: > files: { } > ======================= > That "avatar.php.jpeg" was the file I uploaded, supposed in the files > field. > > The code of the Form: > > $this->widgetSchema['pic1'] = new sfWidgetFormInputFileEditable(array( > 'label' => 'Picture 1', > 'file_src' => '/uploads/item/'.$this->getObject()->getPic1(), > 'is_image' => true, > 'edit_mode' => !$this->isNew(), > 'template' => '<div>%file%<br />%input%<br />%delete% Delete</ > div>', > )); > > $this->validatorSchema['pic1'] = new sfValidatorFile(array( > 'required' => false, > 'path' => sfConfig::get('sf_upload_dir').'/item', > 'mime_types' => 'web_images', > )); > > Could anyone tell me what is the problem? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---