3
回答
SWFupload到底怎么了啊,求指点
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

遇到几个问题: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
});
};

求解啊!

举报
杨某某
发帖于4年前 3回/1K+阅
顶部