On Monday, March 4, 2013 11:52:19 AM UTC+7, James Lukensow wrote:
>
> So here's a quick update:
>
> If in the form, I add the following, I'm noticing that the file is 
> actually uploaded, original, to my files directory.
>
> <?php echo $this->Form->create('Store', array('enctype' => 
> 'multipart/form-data')); ?>
> <fieldset>
> <legend><?php echo __('Add Store'); ?></legend>
> <?php
> echo $this->Form->input('name');
> echo $this->Form->input('user_id');
> echo $this->Form->input('type_id');
> echo $this->Form->input('details');
> echo $this->Form->input('phone');
> echo $this->Form->input('address');
> echo $this->Form->input('city');
> echo $this->Form->input('state');
> echo $this->Form->input('zip');
> echo $this->Form->input('url');
> echo $this->Form->input('is_published');
> echo $this->Form->input('Image.0.photo', array('type' => 'file'));
> //echo $this->Form->hidden('Image.0.is_cover', array('value' => 1));
> ?>
> </fieldset>
>
> However, when adding a store, I'm thrown a few errors:
>
> Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 
> 'field list'
>
> After adding the array('enctype' => 'multipart/form-data') to the form 
> above, here's the new structure of the post data:
>

That's what Form->create('...', array('type' => 'file')) do :)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to