SWFUpload适用于IE,但不适用于Firefox
发布时间:2020-12-15 07:26:10 所属栏目:百科 来源:网络整理
导读:使用SWFUpload v2.2,Firefox 3,IE 8,Flash 10 在我的ASP.NET应用程序中,upload.aspx正在处理所有上传(我在设置对象中设置了正确的upload_url).在IE 8中,上传到upload.aspx页面并进行处理,但在Firefox中却没有.有什么建议? 此处显示了用户访问以上载文件的页
使用SWFUpload v2.2,Firefox 3,IE 8,Flash 10
在我的ASP.NET应用程序中,upload.aspx正在处理所有上传(我在设置对象中设置了正确的upload_url).在IE 8中,上传到upload.aspx页面并进行处理,但在Firefox中却没有.有什么建议? 此处显示了用户访问以上载文件的页面的大部分代码(注意:正在使用母版页): <script type="text/javascript" src="../swfupload/swfupload.js"></script> <script type="text/javascript" src="../js/handlers.js"></script> <script type="text/javascript"> var swfu; window.onload = function() { swfu = new SWFUpload({ // Backend Settings upload_url: "../upload.aspx",post_params: { "ASPSESSID": "<%=Session.SessionID %>" },// File Upload Settings file_size_limit: "10 MB",file_types: "*.*",file_types_description: "All Files",file_upload_limit: 1,file_queue_limit: 1,//assume_success_timeout: 60,// 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/XPButtonNoText_160x22.png",button_placeholder_id: "spanButtonPlaceholder",button_width: 160,button_height: 22,button_text: '<span class="button">Upload File<span class="buttonSmall">(10 MB Max)</span></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,// Flash Settings flash_url: "../swfupload/swfupload.swf",// Relative to this file custom_settings: { upload_target: "divFileProgressContainer" },// Debug Settings debug: false }); } </script> 解决方法
我知道,它是一个旧帖子,但也许它会帮助解决一些人的问题,因为我今天遇到了同样的问题.
我解决了这个问题不是使用post数组,因为我不知道如何以及在何处调试此脚本,但是生成了一个查询字符串 <script type="text/javascript"> var swfu; window.onload = function() { swfu = new SWFUpload({ // Backend Settings upload_url: "../upload.aspx",post_params: { SessionID: "<%=Session.SessionID %>",OtherID: "<%=OtherID %>" },//And here comes the highlight use_query_string : true,//code ... 在此之后你会得到一个这样的查询字符串:?SessionID =(id)& OtherID =(otherid) 这适用于每个浏览器下的保证. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |