开发者

Flex, FileReferences upload() error in firefox

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_D开发者_如何学PythonATA,createOrderStep6Res);
fr.upload(request,"file");


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜