This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

phamvuduycuong15027
phamvuduycuong15027

hi all, I trying to create a upload file form in component, my code:

default.htm {{ form_open({'files': 'true', request: 'onUpload'}) }}

<button type="submit">Upload File</button>

{{ form_close() }}

component.php public function onUpload() { $avatar = new File; $avatar->fromPost(Input::file('image')); $avatar->save(); }

the $avatar it return empty, how can I get the file upload from the component form, thanks

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.