Plupload 适用于所有浏览器栏 IE。#photo-upload
在 IE 中按下链接后,文件浏览器无法打开。的实例uploader
肯定是正确创建的 - 使用开发工具检查。
非常感谢任何解决方案!
这是我们用来创建上传器的脚本:
var uploader = new plupload.Uploader({
runtimes : 'gears,html5,flash,silverlight,html4',
browse_button : 'photo-upload',
container : 'img-container',
url : 'productPhoto.php?id=<?=$_GET["id"];?>',
max_file_size : '5mb',
flash_swf_url : '/dev/plupload/js/plupload.flash.swf',
silverlight_xap_url : '/dev/plupload/js/plupload.silverlight.xap',
unique_names : true,
filters : [{title : "Image files", extensions : "jpg,gif,png"}],
multipart_params: {type:1},
// Post init events, bound after the internal events
init : {
UploadProgress: function(up, file) {
// Called while a file is being uploaded
$("#bar").css("width",file.percent+"%");
},
FilesAdded: function(up, files) {
$(".progress").slideDown();
uploader.start();
up.refresh(); // Reposition Flash/Silverlight
},
UploadComplete: function(up, file, info) {
// Called when a file has finished uploading
setTimeout(function(){
$(".progress").slideUp();
$("#bar").css("width","0");
document.location.reload();
},2000);
},
Error: function(up, args) {
// Called when a error has occured
alert(args);
up.refresh(); // Reposition Flash/Silverlight
}
}
});
uploader.init();