Flex,Firefox 中的 FileReferences upload() 错误

发布于 2024-09-18 10:01:13 字数 639 浏览 3 评论 0原文

https 区域中的 swf 文件,http 区域中的上传脚本。 文件上传在 ie 中正常,但在 firefox、opera 上不起作用。

这段代码:

request.url = this.main.serverHostUpload + "/upload_web.php";

request.method = URLRequestMethod.POST;
request.contentType = "multipart/form-data; boundary=" + UploadPostHelper.getBoundary();

request.data = new URLVariables();
request.data.dst_file = fileDstName;

request.requestHeaders.push( new URLRequestHeader( 'Cache-Control', 'no-cache' ) );

var fr:FileReference = this.main.photos[this.iLoadPh].fr;
fr.cancel();

fr.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,createOrderStep6Res);
fr.upload(request,"file");

swf file in https zone, upload script in http zone.
File upload fine in ie, and not work on firefox, opera.

this code:

request.url = this.main.serverHostUpload + "/upload_web.php";

request.method = URLRequestMethod.POST;
request.contentType = "multipart/form-data; boundary=" + UploadPostHelper.getBoundary();

request.data = new URLVariables();
request.data.dst_file = fileDstName;

request.requestHeaders.push( new URLRequestHeader( 'Cache-Control', 'no-cache' ) );

var fr:FileReference = this.main.photos[this.iLoadPh].fr;
fr.cancel();

fr.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA,createOrderStep6Res);
fr.upload(request,"file");

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

白昼 2024-09-25 10:01:13

我也遇到过类似的问题,如果您通过 https 发布,有时是证书的质量问题。您还应该确保 fileference 使用实际端口号(https 为 443)调用 URL。

我还在 IE 以外的浏览器中看到了火灾引用重新连接。您可以使用 Firefox 或 Fiddler 的 Tamper Data 之类的工具来发现这一点,以获得它的 NIC 级别视图。

I have had similar problems and sometimes it is the quality of the cert if you are posting over https. You also should make sure that fileference is calling a URL with the actual port number (443 for https).

I have also seen fire reference reconnect in browsers other than IE. You can spot this using something like Tamper Data for Firefox or Fiddler to get a NIC-level view of it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文