Closed EdwardWestbury closed 1 year ago
Do you think these 2 could be related, https://github.com/awcodes/filament-curator/issues/269
It's possible. This is the first time I'm personally trying out files with private
visibility, as the images I need to store are of vehicles and contain license plates.
There doesn't seem to be many great resources on this, but I do think my configuration on AWS is fine, as using the standard FileUpload input from Filament seems to work without issue.
I could try and implement an ACL on my bucket to see if that gets me past the issue mentioned in #269
Yea. I'm just thinking that there's something with the temp directory that may not be accessible, but it could be as simple as adding a signing token in the case that the disk is s3. It's on the model's get signed url method. It just might need to be added to the saveUploadedFileUsing on curator's uploader class because the saving method is trying to read the width and height etc, but intervention needs an actual path to a physical file to initialize with.
I missed something painfully obvious and still had my temporary uploads on the local disk.
Changing this to s3 has solved the upload issue for me.
Embarrassed but glad I solved my problem.
Not sure if you find it worthwhile to maybe add a quick mention in the docs that temporary uploads will also need to be pushed to s3 for the muppets like me that don't clue in fast enough :clown_face:
Interesting. Glad you're up and running though. I'll make a note about it and get something added to docs. Thank you.
How did you resolve this? I'm not getting an upload after editing an existing media upload? I'm not getting an error anymore but it's not uploading to s3
Hi @awcodes @EdwardWestbury ,
Could you please provide me with details about fixing these issues? I am currently facing the same problems.
@SanthoshSivan-Dev In my case the problem I had was while I had configured the uploads for Curator to use S3, I had not updated Livewire to do the same. See the documentation link below for the config change required.
Livewire - Uploading directly to Amazon S3
Hope that helps!
Thanks a lot, @EdwardWestbury. This will help me fix my issues.
Filament Version
v3.0.39
Plugin Version
v3.0
PHP Version
PHP 8.1.0
Problem description
Attempting to upload media to S3 using the CuratorPicker component throws the following exception.
Intervention \ Image \ Exception \ NotReadableException - Image source not readable
The visibility of this media is set to
private
however the bucket was also made public just to ensure there are no issues with access. I'm no AWS expert so it's possible I've missed something super obvious, so apologies if that is the case.In the linked reproduction repo the following steps in order were taken
composer require awcodes/filament-curator
&php artisan curator:install
&npm install -D cropperjs
S3 User Settings
S3 Bucket Settings
S3 Bucket Policy
Expected behavior
Upload should not throw the exception. Expect the newly uploaded image to appear in the "media library" output for selection.
Steps to reproduce
Reproduction repository
https://github.com/EdwardWestbury/curator-s3-issue
Relevant log output
No response