Actionscript 3 如何在flash player中使用Google Drive API?
我想在我的flash组件中使用google drive api 我有一个访问密钥,但我不能使用谷歌驱动器api。 我想把文件插入谷歌硬盘Actionscript 3 如何在flash player中使用Google Drive API?,actionscript-3,google-drive-api,flash,Actionscript 3,Google Drive Api,Flash,我想在我的flash组件中使用google drive api 我有一个访问密钥,但我不能使用谷歌驱动器api。 我想把文件插入谷歌硬盘 var urlLoader:MultipartURLLoader = new MultipartURLLoader(); urlLoader.addEventListener(Event.COMPLETE, uploadCompleteHandler); urlLoader.addEventListener(IOErrorEvent.IO_ERROR, up
var urlLoader:MultipartURLLoader = new MultipartURLLoader();
urlLoader.addEventListener(Event.COMPLETE, uploadCompleteHandler);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, uploadIOErrorHandler);
urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, uploadSecurityErrorHandler);
urlLoader.requestHeaders.push(new URLRequestHeader("Authorization", authorization));
urlLoader.load('https://www.googleapis.com/upload/drive/v2/files');
我得到以下错误
[SecurityErrorEvent type="securityError" bubbles=false cancelable=false
eventPhase=2 text="Error #2170: Security sandbox violation:
http://myserver.com/myflash.swf cannot send
HTTP headers to https://www.googleapis.com/upload/drive/v2/files."]
我的服务器crossdomain.xml
<cross-domain-policy>
<allow-access-from domain="*"/>
<site-control permitted-cross-domain-policies="all"/>
<allow-http-request-headers-from domain="*"/>
</cross-domain-policy>
有人能告诉我一个解决办法吗
<cross-domain-policy>
<allow-access-from domain="*"/>
<site-control permitted-cross-domain-policies="all"/>
<allow-http-request-headers-from domain="*"/>
</cross-domain-policy>