FileReference URLrequest上传文件的问题:Session丢失
来源:互联网 发布:修理厂软件 编辑:程序博客网 时间:2024/05/21 06:22
FileReference使用的URLRequest和Flash所在页面用的不同的Session. 所以即使你已经登录,由于上传的请求用的是不同的Session,服务器无法得知请求已经验证。 Adobe文档如此解释
The FileReference and FileReferenceList classes also do not providemethods for authentication. With servers that require authentication,you can download files with the Flash® Player browserplug-in, but uploading (on all players) and downloading (on thestand-alone or external player) fails. Listen for FileReference eventsto determine whether operations complete successfully and to handleerrors.
翻译过来就是 FileReference 不支持验证功能。
解决方法
1. 不使用FileReference,而使用form post上传文件。这样和普通的Html页面一样了。
2. 将Session id传到服务器。 如果你使用的Server是TomCat/JSP 可以如下添加SessionID. var request:URLRequest = new URL Request("http://www.[your url].com" ";jsessionid=" _yoursessionid); 3. 不验证Session,而检查上传ID。比如每次上传前,服务器生成一个ID,上传的时候把这个传ID作为URLRequest的参数传过去。
4. 将需要验证的用户名密码,添加至URLRequest的参数,在服务器端进行验证,然后在服务器端,将用户信息存入session,这样,只要flex页面session不变,下次提交请求时,服务器端的session就是保存用户信息的session。
5. 等待adobe发布hotfix.
参考:
http://bbs.airia.cn/FLEX/thread-732-1-1.html
http://www.thanksmister.com/index.php/archive/firefox-flex-urlrequest-and-sessions-issue/
http://www.forta.com/blog/index.cfm/2006/9/24/flex-and-session-state-management
The FileReference and FileReferenceList classes also do not providemethods for authentication. With servers that require authentication,you can download files with the Flash® Player browserplug-in, but uploading (on all players) and downloading (on thestand-alone or external player) fails. Listen for FileReference eventsto determine whether operations complete successfully and to handleerrors.
翻译过来就是 FileReference 不支持验证功能。
解决方法
1. 不使用FileReference,而使用form post上传文件。这样和普通的Html页面一样了。
2. 将Session id传到服务器。 如果你使用的Server是TomCat/JSP 可以如下添加SessionID. var request:URLRequest = new URL Request("http://www.[your url].com" ";jsessionid=" _yoursessionid); 3. 不验证Session,而检查上传ID。比如每次上传前,服务器生成一个ID,上传的时候把这个传ID作为URLRequest的参数传过去。
4. 将需要验证的用户名密码,添加至URLRequest的参数,在服务器端进行验证,然后在服务器端,将用户信息存入session,这样,只要flex页面session不变,下次提交请求时,服务器端的session就是保存用户信息的session。
5. 等待adobe发布hotfix.
参考:
http://bbs.airia.cn/FLEX/thread-732-1-1.html
http://www.thanksmister.com/index.php/archive/firefox-flex-urlrequest-and-sessions-issue/
http://www.forta.com/blog/index.cfm/2006/9/24/flex-and-session-state-management
来源:sina Blog
- FileReference URLrequest上传文件的问题:Session丢失
- Firefox中使用FileReference上传文件的问题:Session丢失
- 解决php uploadify上传文件时session丢失的问题
- 使用FileReference上传文件
- Uploadify上传Session丢失问题
- 解决使用FireFox下Flash上传文件时SESSION丢失的问题(swfupload)
- flex:使用FileReference上传文件
- 利用FileReference来上传文件
- FileReference 上传文件,java接收
- 上传SVN丢失.a文件的问题
- Flash中使用Filereference上传文件的一些注意事项
- Session丢失的问题!
- swfupload上传文件 error-200 session丢失
- 解决uploadify上传丢失session问题
- flex filereference+httphandler实现文件上传/下载
- Flex FileReference 上传或下载文件
- session变量“丢失”的问题
- 谈谈Session丢失的问题
- 在IE6中,Frame和 IFrame中无法按常规方法来读写cookies。
- jni中GB2312中文编码在Java中显示
- java synchronized详解
- android Vibrator 使用
- 调用MessageUI框架实现收送邮件
- FileReference URLrequest上传文件的问题:Session丢失
- ios关于深拷贝和浅拷贝的说明
- JS超级动感展示
- Ubuntu12 Solr 配置过程
- cocos2d-x与ios内存管理分析
- IOS开发xcode报错之has been modified since the precompiled header was built
- SourceInsight使用技巧
- Android留言
- 龙应台对港大毕业生的演讲