1
我有一個非常特殊的情況。因此,該網站使用SWF上傳作爲上傳工具,並將其過濾爲僅允許上傳圖片。在開發和生產工作中進行測試很好。然而,在暫存環境中,當我嘗試通過Safari或Firefox上載圖像時,我收到一條提示,其中顯示401。我知道401是一個驗證錯誤,並且查看以前的解決方案,我已經使用了後參數,甚至將use_query_string的值設置爲true。現在,除了使用Safari或Firefox進行分期以外,它還可以在任何地方和任何情況下使用。我粘貼了下面的SWFUpload參數進行驗證。我能做些什麼來使它工作?謝謝!401僅在Safari和Firefox中使用SWF上傳(.NET)時出現上傳錯誤
swfu = new SWFUpload({
// Backend Settings
upload_url: "/digital/DigitalLibraryUploadHandler.ashx",
post_params :
{
"ASPSESSID" : "<%=Session.SessionID %>",
"BATCHID" : batchId,
"USERID" : userId
},
// File Upload Settings
file_types: "*.doc; *.flv; *.htm; *.html; *.jpg; *.pdf; *.swf; *.txt; *.xls",
file_types_description : "Allowed Files",
file_upload_limit : "0", // Zero means unlimited
// 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.
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/XPButtonNoText_160x22.png",
button_image_url: "/Images/dl/but_add_image.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 69,
button_height: 16,
//button_text : '<span class="button" style="z-index:-1">Upload</span>',
//button_text : '<span class="button" style="text-align:center">Upload</span>',
//button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 14pt; } .buttonSmall { font-size: 10pt; }',
//button_text_top_padding: 1,
//button_text_left_padding: 5,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
prevent_swf_caching : true,
// Flash Settings
flash_url: "/includes/swfUpload/swfupload.swf", // Relative to this file
custom_settings : {
upload_target : "divFileProgressContainer"
},
// Debug Settings
debug: false,
//Use Query String
use_query_string: true
});
這裏有另一個迷人的珍聞,當我運行Fiddler它以某種方式「抑制」錯誤以及。不過,我知道不是每個人都有提琴手,我不會讓他們使用圖片上傳器。 –