I'm having a problem while using the "submit ();" in an input type="file" with an onchage passing an id to the function, I made a test with an alert and it is returning me "[object HTMLFormElement]", I do not know where the problem is.
function autoform(id) {
alert(id);
document.getElementById(id).submit();
}
<form action="" id="form" enctype="multipart/form-data">
<input type="file" onchange="autoform(form);" autocomplete="off">
</form>