首页 文章

将对象插入谷歌 Cloud 存储返回'no such bucket'

提问于
浏览
2

我正在使用google-api-php-client . 我正在使用服务帐户进行身份验证并收到TOKEN确认 . 尝试使用Google Cloud Storage JSON API在Google Cloud 端存储中插入对象 .

当试图将对象插入BUCKET时,返回: NoSuchBucket-The specified bucket does not exist. 但我可以保证它确实存在,正如我在网络管理器控制台中看到的那样,并且已经有我几天前上传的图像 .

完整的消息说: Error calling POST https://www.googleapis.com/upload/storage/v1beta2/b//o?uploadType=multipart&name=thec36b23baf2778d.jpg: (404)

我可以确认存在桶,因为我在运行GET_BUCKET时得到了200个带有完整对象信息的响应:

object(Google_Service_Storage_Bucket)[182]
  {.......}
  protected 'defaultObjectAclType' => string 'Google_Service_Storage_ObjectAccessControl' (length=42)
  protected 'defaultObjectAclDataType' => string 'array' (length=5)
  public 'etag' => string 'CAI=' (length=4)
  public 'id' => string '{here-goes-my-existing-bucket-name}' (length=42)
  {.......}
  public 'name' => string '{here-goes-my-existing-bucket-name}' (length=42)
  protected 'ownerType' => string 'Google_Service_Storage_BucketOwner' (length=34)
  protected 'ownerDataType' => string '' (length=0)
  public 'selfLink' => string 'https://www.googleapis.com/storage/v1beta2/b/{here-goes-my-existing-bucket-name}' (length=87)
  {.......}

这可能是API的问题吗?

1 回答

  • 0

    谢谢你报道这个 .

    我们知道这个问题,我们的工程师正在努力解决这个问题 .

    同时,您应该能够使用 gsutil 作为临时解决方法 .

    对于给您带来的不便,我们深表歉意 .

相关问题