2👍
✅
Using JavaScript/jQuery:
<form>
<input type="file" class="autosubmit" />
</form>
And then apply the following:
$('form .autosubmit').on('change', function() {
this.form.submit();
});
Without jQuery it’s very similar, you’ll just need to use EventTarget.addEventListener
.
Source:stackexchange.com