SWFupload到底怎么了啊,求指点? 400 报错
遇到几个问题:SWFUpload.version = "2.5.0 2010-01-15 Beta 2";
1、swfupload+struts2上传,结果从struts2里面的XXFileName中获取的文件名是这样“IMG_20140325_091550.jpg.jpg”,就是多了个扩展名!!!
2、我上次png,gif,bmp,这样的图片,结果会在struts2里面的XXFileName中获取的文件名是这样“IMG_20140325_091550.png.jpg”,“IMG_20140325_091550.gif.jpg”,“IMG_20140325_091550.bmp.jpg”
3、我一上传非图片的文件后就报错:Error generating resized image.Resizing:ERROR #2124
附上部分配置:
var swfu;
window.onload = function () {
swfu = new SWFUpload({
// Backend Settings
upload_url:"/file/upLoad.action;jsessionId" + "=" + window["sessionId"],
file_post_name:"xx",
// File Upload Settings
file_size_limit : "10240",
file_types : "*.*",
file_types_description : "All Files",
file_upload_limit : "5",
// Event Handler Settings - these functions as defined in Handlers.js
// The handlers are not part of SWFUpload but are part of my website and control how
// my website reacts to the SWFUpload events.
swfupload_preload_handler : preLoad,
swfupload_load_failed_handler : loadFailed,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
// Button Settings
button_image_url : "/images/swfupload/SmallSpyGlassWithTransperancy_17x18.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 180,
button_height: 18,
button_text : '<span class="button">浏览 <span class="buttonSmall">(最大10MB)</span></span>',
button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 11pt; }',
button_text_top_padding: 0,
button_text_left_padding: 18,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
// Flash Settings
flash_url : "/scripts/swfupload/swfupload.swf",
//flash9_url : "/scripts/swfupload/swfupload_fp9.swf",
custom_settings : {
upload_target : "divFileProgressContainer",
progressTarget : "fsUploadProgress",
thumbnail_height: 400,
thumbnail_width: 400,
thumbnail_quality: 100
},
// Debug Settings
debug: false
});
};
求解啊!
SWF在某个ie的某个flash版本会有问题的。自己写了个开源的上传的插件 http://www.twinkling.cn 支持主流浏览器的上传, 当然也支持html5的续传,文件夹上传,拖拽等功能
######回复 @hanmrs : hehe######回复 @hanmrs : 哈哈######有点问题######换回2.2版本就没这个问题了。。。。。。
######换回2.2版本就没这个问题了。。。。。。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。