2
我正在使用plupload隊列小部件,但它不起作用。Plupload文件錯誤5 MB
每次我嘗試上傳一個大於5 MB的文件時,它會100%,並給我一個http錯誤。
當我從3 MB上傳文件,這將完美的工作,100%後,他給了我一個綠色的好標誌。
$(function() {
$("#uploader").pluploadQueue({
runtimes: 'html5,html4,flash,gears,silverlight,browserplus',
url: '/Upload/Upload',
max_file_size: '10mb',
post_max_size: '10mb',
upload_max_filesize: '10mb',
chunk_size: '10mb',
unique_names: true,
urlstream_upload:true,
multipart: true,
multiple_queues: false,
filters: [
{title: "Foto's", extensions: "jpg,gif,png"},
{title: "Video's", extensions: "wmv,avi" },
{ title: "Microsoft Office", extensions: "docx,xslx" },
{ title: "Zip files", extensions: "zip" },
],
preinit: {
FileUploaded: function (up, file, response) {
var data = response.response; //$.parseJSON(response.response);
$('<input>').attr({
type: 'hidden',
name: 'fileId' + data,
value: data
}).appendTo('#uploadFinishedForm');
if (data.error == 1) {
uploader.trigger("Error", { message: "'" + data.message + "'", file: file });
console.log('[Error] ' + file.id + ' : ' + data.message);
return false;
}
},
UploadComplete: function (up, files) {
window.setTimeout(function (form) {
// $('#uploadFinishedForm').submit();
$('.nextButton').append('<input type="submit" class="btn btn-large btn-success submit-btn" value="Transfer" />');
}, 2000)
},
Init: function (up, info) {
$('#uploader_container').removeAttr("title");
}
}
});
$('#uploadForm').submit(function (e) {
var uploader = $('#uploader').pluploadQueue();
if (uploader.files.length > 0) {
uploader.bind('StateChanged', function() {
if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
$('#uploadForm').submit();
}
});
uploader.start();
} else {
$('#uploadInfo').html('Zonder foto\'s valt er niets te uploaden!');
}
return false;
});