开发者

Flex, FileReferences upload() error in firefox

开发者 https://www.devze.com 2023-01-15 15:36 出处:网络
swf file in https zone, upload script in http zone. File upload fine in ie, and not work on firefox, opera.

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

精彩评论

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