【发布时间】:2016-10-04 01:26:36
【问题描述】:
我有一个 android 应用程序,它可以将图像保存到 Google 云端硬盘中,并将网络链接共享到我的 Google App Engine 服务器 (python)。
// Create client
mGoogleApiClient = new GoogleApiClient.Builder(mContext)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
// handling results after uploading
final DriveOperationResult<Metadata> driveOperationResultHandler = new DriveOperationResult<Metadata>() {
@Override
public void onDriveOperationSucceeded(Metadata result) {
try {
// Successfully fetched metadata
onSuccess(driveId,
result.getOriginalFilename(),
result.getWebContentLink(),
result.getWebViewLink(),
result.getAlternateLink(),
result.getEmbedLink());
} finally {
mGoogleDriveClient.disconnectAsync();
}
}
注意: result.getEmbedLink() 总是返回 null。此外,result.getAlternateLink() 和 result.getWebContentLink() 不可访问。我正在使用 Google Drive Android API。
我需要从谷歌应用引擎发布到另一台服务器的链接。如何从 google app engine [python] 或 android 获取可共享链接?
或
如何更改链接的权限,以便知道链接的任何人都可以阅读?
【问题讨论】:
-
向我们展示您在尝试了 appengine 中的 Drive api(使用您的 appengine 语言的库或使用 Rest)之后到目前为止所尝试的内容,以及失败的原因。还要说明是您的驱动器还是用户驱动器。
标签: android python google-app-engine google-drive-api file-sharing