Flash コンポーネントで Google ドライブ API を使用したいと考えています。
アクセスキーは取得できますが、Google ドライブ API を使用できません。ファイルをGoogleドライブに挿入したい。
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."]
https://www.googleapis.com/crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/crossdomain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*.google.com" secure="false"/>
<allow-access-from domain="*.doubleclick.com" secure="false"/>
<allow-access-from domain="*.doubleclick.net" secure="false"/>
<allow-access-from domain="*.gstatic.com" secure="false"/>
<allow-access-from domain="*.teracent.net" secure="false"/>
<allow-access-from domain="*.2mdn.net" secure="false"/>
<allow-access-from domain="*.youtube.com" secure="false"/>
<allow-access-from domain="*.ytimg.com" secure="false"/>
<allow-http-request-headers-from domain="*" headers="Accept,Accept-Language,Authorization,Cache-Control,Content-Disposition,Content-Encoding,Content-Language,Content-Length,Content-MD5,Content-Range,Content-Type,Date,GData-Version,Host,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,Origin,OriginToken,Pragma,Range,Slug,Transfer-Encoding,X-ClientDetails,X-GData-Client,X-GData-Key,X-Goog-AuthUser,X-Goog-Encode-Response-If-Executable,X-Goog-Upload-Command,X-Goog-Upload-Content-Disposition,X-Goog-Upload-Content-Length,X-Goog-Upload-Content-Type,X-Goog-Upload-Offset,X-Goog-Upload-Protocol,X-HTTP-Method-Override,X-JavaScript-User-Agent,X-Origin,X-Referer,X-Upload-Content-Length,X-Upload-Content-Type,X-Use-HTTP-Status-Code-Override,X-YouTube-VVT"/>
</cross-domain-policy>
私のサーバー 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>
plz誰かが私に解決策を教えてもらえますか