SWFupload到底怎么了啊,求指点
遇到几个问题: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
});
};
求解啊!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
引用来自“杨某某”的评论
换回2.2版本就没这个问题了。。。。。。
换回2.2版本就没这个问题了。。。。。。
有点问题
回复
哈哈
回复
hehe
SWF在某个ie的某个flash版本会有问题的。自己写了个开源的上传的插件 http://www.twinkling.cn 支持主流浏览器的上传, 当然也支持html5的续传,文件夹上传,拖拽等功能