-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$config in AwsS3V3Adapter copy function is null/empty #1759
Comments
The issue also exists with the
Will run this code:
This is where the exception is caught. My disk setup is like yours: Downgrading to 3.15 does not resolve it for me though. |
Did any of you guys find a solution for the problem? Move (and copy) seems not to be working on r2 |
this seems related: #1791 |
it seems the config is not passed down to the copy() function
when i debug this with ray(), i see the config object is not the same So it seems the Laravel Disk/storage config is not passed correctly, so it tries to fetch the visibility from the file (GetObjectACL is not supported by Cloudflare R2), so it will throw an Exception. It seems the the laravel disk config is not passed correctly to AwsS3V3Adapter. -- UPDATE
and then add
the "moving/copying" of the file works... |
I just tested this and can confirm this behaviour |
If somebody needs quick and dirty way to get this working:
|
Bug Report
Summary
I am using Laravel 9.52.16 and the S3 driver to upload/move files to Cloudflare R2. The upload is in a temporary folder, and then I move it to the final folder. The move function is the issue.
In the config, I have set visibility to 'private' to prevent calling GetObjectAcl that is not supported by R2, but after upgrading to 3.24.0 it gave the error that GetObjectAcl is not supported.
During troubleshooting I just dumped the $config variable when the copy function is called here
flysystem/src/AwsS3V3/AwsS3V3Adapter.php
Line 418 in b25a361
It's possible I missed something?
How to reproduce
R2 config:
Single line of code:
Actual error, removed irrelevant lines:
The text was updated successfully, but these errors were encountered: