在我们的项目中,我们使用plupload上传单个excel文件.这适用于IE9以外的所有浏览器.单击上载链接时,将显示文件对话框,但尝试打开Excel时没有任何反应.以下是供参考的代码,我们非常感谢您解决此问题的任何帮助.提前致谢!
function initUploader(btnId, fileType, onSuccess) {
if (typeof fileType == "undefined") fileType = "image";
var arrFilters = new Array();
var url = 'user/attachmentUpload';
switch (fileType) {
case "image":
arrFilters = [{title : "Image files", extensions : "jpg,jpeg,gif,png"}];
url = 'assets/imgupload';
break;
case "xls":
arrFilters = [{title : "Spreadsheet files", extensions : "xls,xlsx"}];
url = 'user/attachmentUpload';
break;
case "media":
arrFilters = [{
title : "Media files",
extensions : "mpeg4,mob,3gpp,avi,wmv,mp3,m4a,ogg,wav"
}];
break;
case "document":
arrFilters = [{
title : "Text files",
extensions …Run Code Online (Sandbox Code Playgroud)