는 여러 개의 파일을 jquery file upload 사용하여 업로드 한 후 페이지를 새로 고치려고 : 내 테스트 메시지가 각 개별 파일 업로드 완료 후 호출되는 몇 가지 이유를 들어jquery 파일을 여러 번 업로드 할 때까지 기다리는 방법은 무엇입니까?
을 나는 결국 한 번만이 전화를하려고 해요 파일이 업로드되었습니다. 이것이 가능한가?
HTML :
<form id="fileupload" action="server/php/" method="POST" enctype="multipart/form-data">
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="span7">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
<i class="icon-plus icon-white"></i>
<span>Add files...</span>
<input type="file" name="files[]" multiple>
</span>
<button type="submit" class="btn btn-primary start">
<i class="icon-upload icon-white"></i>
<span>Start upload</span>
</button>
</div>
</div>
<!-- The loading indicator is shown during file processing -->
<div class="fileupload-loading"></div>
<br>
<!-- The table listing the files available for upload/download -->
<table role="presentation" class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>
</form>
JQuery와
$('#fileupload').bind('fileuploadcompleted', function (e, data) {
e.preventDefault();
// I would expect to see this after all files ahve uplaoded but I see it for each file upload ?
alert("Completed");
//location.reload();
...
})
불행하게도이 – Paul
솔직히, 다음,이 플러그인이 아닌 것 같아 (예를 들어 너무 작은 등 파일)로 인해 fileuploadcompleted 이벤트 처리기가 오류를 가진 파일이 포함되지 않는다는 사실에 작동하지 않습니다 가장 강력한 솔루션. 나는 당신이 원하는 옵션을 가지고있는 많은 것을 Uploadify를 사용했다. 그러나 그것은 당신에게 달려있다. –