即时通讯使用谷歌API的PHP客户端。 我正在用服务帐户进行身份验证,并收到TOKEN ok。 尝试使用Google Cloud Storage JSON API在Google云端存储中插入对象。插入对象到谷歌云存储返回'没有这样的桶'
尝试将对象插入BUCKET时,返回:NoSuchBucket - 指定的存储桶不存在。但我可以保证它确实存在,就像我在Web管理器控制台中看到的那样,并且已经有几天前我已上传的图像。
完整的消息说: 错误呼叫POST https://www.googleapis.com/upload/storage/v1beta2/b/ {这里 - 去 - 我的现有斗名}/O uploadType =多&名= 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的问题?
我也有smae问题,桶已经存在,并有数百个文件 – scharli
我今天早上有同样的问题。 – Erevald
在云控制台(Web界面)中也出现错误,尝试创建文件夹或上载对象时返回错误。所以这似乎是API的一般错误。 – guillefd