只需要在input按钮里面加οnchange="this.form.submit();"就行了
<form action="http://127.0.0.1:8848/index" method="post" enctype="multipart/form-data">
<input type="file" onchange="this.form.submit();" name="filename" multiple/>
<!-- <input type="submit" value="手动上传" />-->
<!-- <input type="reset" value="重新选择" />-->
</form>