I have a file input field, and I'd like the file to be automatically uploaded when browsing is done, instead of forcing the user to click on a submit button.
I've tried:
h form buid: [:f |
f file
beSubmitOnChange;
action: [ :file | file doWhatever ]].
And it seems like it almost works, as the progress bar is rendered, but it fails to actually upload the file. Any ideas?
However, maybe it'd be nice to override #beSubmitOnChange in case the input field is a file input, so that it executes this code instead of the default one.
I have a file input field, and I'd like the file to be automatically uploaded when browsing is done, instead of forcing the user to click on a submit button.
I've tried:
h form buid: [:f |
f file
beSubmitOnChange;
action: [ :file | file doWhatever ]].
And it seems like it almost works, as the progress bar is rendered, but it fails to actually upload the file. Any ideas?