Azure does not support visibility
when uploaded image from tinyeditor then get this error.
League
\
Flysystem
\
UnableToRetrieveMetadata
PHP 8.2.17
10.48.4
Unable to retrieve the visibility for file at location: 72InjyRyBQA9TGK2eKmkdjreJ57lfixFNJV5Y0RF.jpg. Azure does not support visibility
2 Replies
I have the same problem. It is similar to the one discussed in https://discord.com/channels/883083792112300104/1210749603293429810/1210751231874703472
In my case, I use R2 from Cloudflare, so I can't use Acl (the error there is that GetObjectAcl is not being implemented from S3).
I am using the Filament/Spatie Markdown editor.
I have to say that the problem is the error message and that you don't get the image in Markdown, the image DOES upload correctly to R2.
So reading a little bit different discussions by github.
https://github.com/thephpleague/flysystem/issues/1759
https://github.com/statamic/cms/pull/9065
https://github.com/thephpleague/flysystem/issues/1791
I've tested and commenting out this piece of code from the trait (Filament\Forms\Components\Concerns\HasFileAttachments), everything would work perfectly.
I don't know how this could be handled without touching the original trait, since the problem is that you cannot check visibility in R2 (or in S3 without Acl).
Any ideas?
Thanks!
The laravel errors was
(I couldn't fit it all in one message 😅 )
Honestly, this is a problem with any rich text editor and file uploads. Ie, you want to upload an image to a third party that requires authorization to upload which means a token in the returned url, but you are storing that url with its token in the html, which means any time it’s read back out the token has already expired.