Google 存储:如何检查一个对象是否存在?

Google Storage: how to check if an object exists?

检查 Google 存储桶中是否存在具有给定名称的对象的最佳 JSON API 方法是什么?

可以使用storage.objects.get and check for a 404 response. Alternatively, if you want to create an object only if doesn't already exist, you can set the ifGenerationMatch参数为0,如果对象已经存在,则返回前置条件失败。