0

ドキュメントAPIを介して(pgp)ファイルをアップロードし、その可視性を公開に変更しました。ただし、そのファイルのコンテンツリンクを使用して公開してダウンロードすることはできません。

問題のファイルのメタデータに関連するxmlのビットは次のとおりです。

$ curl -H "GData-Version: 3.0" -H "Authorization: Bearer ..." https://docs.google.com/feeds/default/private/full

...
    <content type="application/pgp-encrypted" src="https://doc-0c-c0-docs.googleusercontent.com/docs/securesc/tkl8gnmcm9fhm6fec3160bcgajgf0i18/opa6m1tmj5cufpvrj89bv4dt0q6696a4/1336514400000/04627947781497054983/04627947781497054983/0B_-KWHz80dDXZ2dYdEZ0dGw3akE?h=16653014193614665626&amp;e=download&amp;gd=true"/>
...
    <gd:feedLink rel="http://schemas.google.com/acl/2007#accessControlList" href="https://docs.google.com/feeds/default/private/full/file%3A0B_-KWHz80dDXZ2dYdEZ0dGw3akE/acl"/>

$ curl -H "GData-Version: 3.0" -H "Authorization: Bearer ..." https://docs.google.com/feeds/default/private/full/file%3A0B_-KWHz80dDXZ2dYdEZ0dGw3akE/acl

...
  <entry gd:etag="W/&quot;DUcNRns4eCt7ImA9WhVVFUw.&quot;">
    <id>https://docs.google.com/feeds/id/file%3A0B_-KWHz80dDXZ2dYdEZ0dGw3akE/acl/default</id>
...
    <gAcl:role value="reader"/>
    <gAcl:scope type="default"/>
...

問題のファイルに対して返されるロール/スコープはでありreader/default、パブリックであることを示します。(Web UIのパブリック共有アクセスにも表示されます。)

ただし、content要素のsrc属性にアクセスすると、次のようになります。

$ curl --verbose 'https://doc-0c-c0-docs.googleusercontent.com/docs/securesc/tkl8gnmcm9fhm6fec3160bcgajgf0i18/opa6m1tmj5cufpvrj89bv4dt0q6696a4/1336514400000/04627947781497054983/04627947781497054983/0B_-KWHz80dDXZ2dYdEZ0dGw3akE?h=16653014193614665626&e=download&gd=true'

< HTTP/1.1 401 Unauthorized
< Server: HTTP Upload Server Built on May 7 2012 18:16:42 (1336439802)
< WWW-Authenticate: GoogleLogin realm="http://www.google.com/accounts"
< Date: Tue, 08 May 2012 22:48:37 GMT
< Expires: Tue, 08 May 2012 22:48:37 GMT
< Cache-Control: private, max-age=0
< Content-Length: 0
< Content-Type: text/html
4

1 に答える 1

1

ドキュメントを公開しようとしているようです: https://developers.google.com/google-apps/documents-list/#publishing_documents_by_publishing_a_single_revision

公開すると、rel が「http://schemas.google.com/docs/2007#publish」に設定されたリンクは、ウェブ上で公開されたドキュメントを指すようになります。

于 2012-05-09T22:35:08.323 に答える