私はIE8にこのコードを使用すると、ファイルが細かいHTTPリクエストを介して送信されます。HTMLアップロードファイル小さな操作
<form action="http:localhost:8080/myApp"
enctype="multipart/form-data" method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file<br>
<input type="file" name="datafile" size="40">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
が、私は別の中間のボタンを追加するとき、「ファイルを追加」、あなたのように下の「ブラウズ」ボタンを押すのではなく、ファイルがサーバー側に送信されないのはなぜですか?
<form action="http:localhost:8080/myApp"
enctype="multipart/form-data" method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file<br>
<input id="fileChooser" type="file" name="datafile" size="40">
</p>
<button onclick="document.getElementById('fileChooser').click()">Add File</button>
<div>
<input type="submit" value="Send">
</div>
</form>
を実装しました - それは動作します( - : – Spiderman