我正在使用 plupload.com/example_queuewidget.php jquery 小部件 - 但有些图像(主要是超过 1MB 的 jpeg)被上传但我无法打开它们。即使通过 ftp 手动下载它们 - 它们已损坏/损坏。有没有人遇到过类似的问题并且知道如何解决这个问题?
编辑:图像在上传之前工作。
使用示例中的代码:
$("#uploader").pluploadQueue({
// General settings
runtimes : 'flash,gears,silverlight,browserplus,html5',
url : '../../upload.php',
max_file_size : '6mb',
chunk_size : '1mb',
unique_names : true,
// Specify what files to browse for
filters : [
{title : "Image files", extensions : "jpg,gif,png"}
],
// Flash settings
flash_swf_url : '/assets/script/plupload/plupload.flash.swf',
// Silverlight settings
silverlight_xap_url : '/assets/script/plupload/plupload.silverlight.xap'
});
// Client side form validation
$('form#galerie_upload').submit(function(e) {
var uploader = $('#uploader').pluploadQueue();
// Files in queue upload them first
if (uploader.files.length > 0) {
// When all files are uploaded submit form
uploader.bind('StateChanged', function() {
if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) {
$('form#galerie_upload')[0].submit();
}
});
uploader.start();
} else {
alert('You must queue at least one file.');
}
return false;
});
upload.php 是来自这里的示例 upload.php
希望有人已经偶然发现了这一点。
祝你今天过得愉快!