while uploading files u have to create form like
<?php echo
$form->create('Author',array('name'=>'AddAuthor','type'=>'file','url'=>array('controller'=>'authors','action'=>'admin_add')));
?>
'type'=>'file' is important for uploading files.On Thu, Mar 12, 2009 at 11:38 AM, manisha <[email protected]> wrote: > > Hello, > > I am a new user for cakePHP and I am using $form->file > ('UserInfo.company_logo', array('size' => 40)); for uploading an > image, but after post, I am getting array like > > Array > ( > [data] => Array > ( > [name] => Array > ( > [UserInfo] => Array > ( > [company_logo] => > [user_photo] => > ) > ) > [type] => Array > ( > [UserInfo] => Array > ( > [company_logo] => > [user_photo] => > ) > ) > > [tmp_name] => Array > ( > [UserInfo] => Array > ( > [company_logo] => > [user_photo] => > ) > > ) > [error] => Array > ( > [UserInfo] => Array > ( > [company_logo] => 4 > [user_photo] => 4 > ) > > ) > > [size] => Array > ( > [UserInfo] => Array > ( > [company_logo] => 0 > [user_photo] => 0 > ) > > ) > > ) > > ) > > > Does anyone has some idea about how to upload an image with cakePHP? > > > > -- Regards, Gayatri, IT Associate, IEG, Hyderabad. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
