hello,
create a form with an input field
echo $this->Form->create($document, ['enctype' => 'multipart/form-data']);
// OR
echo $this->Form->create($document, ['type' => 'file']);
Next add either of the two lines to your form view file:
echo $this->Form->input('submittedfile', [
'type' => 'file'
]);
// OR
echo $this->Form->file('submittedfile');
this will add a [submittedfile][yourfilename] to your $this->request->data
array
check on Cookbook
<http://book.cakephp.org/3.0/en/views/helpers/form.html#creating-file-inputs>
El dimecres, 2 setembre de 2015 14:23:07 UTC+2, Linux User va escriure:
>
> Can anybody please help me uploading images in cakephp3, example
>
>
>
>
>
--
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.
For more options, visit https://groups.google.com/d/optout.