This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
So how do you deal with uploading images to backend with onSave function from form controller considering this is the default way they show you how to do backend CRUD in the docs here https://octobercms.com/docs/backend/forms#form-create-view
The data-request attribute should refer to the onSave AJAX handler provided by the form behavior.
I looked at https://octobercms.com/docs/database/model#file-attachments but this implies that you can edit/override the onSave function
Here's my create.htm http://pastebin.com/s52yr0Rw
this is my model http://pastebin.com/rj6tpNuC
and these are my fields.yaml http://pastebin.com/A5kZbEMe
Turns out you don't really need to save anything on the model side of the database. All uploads go to system_files table and to access the images you just say Work.images found the solution here https://octobercms.com/forum/post/link-to-public-image#post-955
1-2 of 2