尝试使用 Superbalist/flysystem-google-cloud-storage 上传到 Google 云存储

And*_*ira 6 php storage google-cloud-storage flysystem

更新:使用此 PR 中的代码修复了它,我已要求协助合并 PR,但目前我的问题已通过叉子进行排序。

尝试通过以下包上传到Google云存储:

https://github.com/Superbalist/flysystem-google-cloud-storage#usage

我的集成可以很好地使用细粒度访问控制,但我需要使用统一访问,并且任何时候我将其设置为统一而不是细粒度,我都无法再上传到存储桶,并收到以下错误:

{
  "error": {
    "code": 400,
    "message": "Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. Read more at https://cloud.google.com/storage/docs/uniform-bucket-level-access.",
    "errors": [
      {
        "message": "Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. Read more at https://cloud.google.com/storage/docs/uniform-bucket-level-access.",
        "domain": "global",
        "reason": "invalid"
      }
    ]
  }
}
Run Code Online (Sandbox Code Playgroud)

为了让这个工作正常进行,我可能会缺少什么想法?

Jan*_*dez 4

这看起来与Superbalist/laravel-google-cloud-storage 包的已知问题类似

使用此包的唯一方法是使用细粒度访问控制,或直接使用官方的谷歌云存储 PHP 库

  • @AndréFigueira 为了帮助遇到相同问题的人并避免重复的问题,您可以发布您的代码补丁吗? (2认同)