2
我使用dropzonejs這樣:懸浮窗行動被上傳
<script type="text/javascript">
jQuery(function($) {
try
{
$(".dropzone").dropzone({
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 0.5, // MB
uploadMultiple: true,
//addRemoveLinks : true,
dictDefaultMessage :
'<span class="bigger-150 bolder"><i class="icon-caret-right red"></i> Drop files</span> to upload \
<span class="smaller-80 grey">(or click)</span> <br /> \
<i class="upload-icon icon-cloud-upload blue icon-3x"></i>',
dictResponseError: 'Error while uploading file!',
//change the previewTemplate to use Bootstrap progress bars
previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\" data-dz-size></div>\n <img data-dz-thumbnail />\n </div>\n <div class=\"progress progress-small progress-striped active\"><div class=\"progress-bar progress-bar-success\" data-dz-uploadprogress></div></div>\n <div class=\"dz-success-mark\"><span></span></div>\n <div class=\"dz-error-mark\"><span></span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>"
});
}
catch(e)
{
alert('Dropzone.js does not support older browsers!');
}
});
</script>
確切位置在哪裏我可以把聽衆做做某事(重載/重定向/警報)的所有文件都上傳後?
你能舉個例子嗎?我想這樣,但它不工作: 初始化:函數(){ \t \t \t \t \t this.on( 「completemultiple」 功能(文件){警報( 「添加文件」);}); \t \t \t \t \t}, – user3174311
所以你沒有看到警報?你可以檢查以確保你有最新的dropzone JS?沿着'paramName'等其他dropzone參數添加completemultiple參數。 – Scott