You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trace into Google cloud storage and finally found this.
{
"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"
}
]
}
}
Finally I found throw option in FilesystemAdapter.php
/** * Determine if Flysystem exceptions should be thrown. * * @return bool */protectedfunctionthrowsExceptions(): bool
{
return (bool) ($this->config['throw'] ?? false);
}
Unable to write file at location: tests/hi.txt. {
"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"
}
]
}
}
Conclusion
Add 'throw' in default gcs configuration for easy debugging.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As I can setup download in 5 mins, upload got me 3 hours for two reasons,
I trace into Google cloud storage and finally found this.
{ "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" } ] } }Finally I found
throwoption in FilesystemAdapter.phphttps://github.com/laravel/framework/blob/07e12d378ec0875cdcfe4272d120d56e2312f713/src/Illuminate/Filesystem/FilesystemAdapter.php#L967
So I went back to
config/filesystems.phpNow I can see this exception right from my test.
Conclusion
Add 'throw' in default gcs configuration for easy debugging.
Beta Was this translation helpful? Give feedback.
All reactions