Skip to content
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

S3 Uploads: Image source not readable #491

Closed
SanthoshSivan-Dev opened this issue May 28, 2024 · 0 comments
Closed

S3 Uploads: Image source not readable #491

SanthoshSivan-Dev opened this issue May 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SanthoshSivan-Dev
Copy link

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

  1. Created a new Laravel App, installed latest Filament Panels v3 (stable)
  2. Setup an S3 bucket & IAM user
  3. Attach AmazonS3FullAccess permissions to the user, implement basic policy on bucket (see below)
  4. Generated aws keys, added to .env
  5. Added a simple Blog model with title and content
  6. composer require awcodes/filament-curator & php artisan curator:install & npm install -D cropperjs
  7. Generated a filament theme, imported the css mentioned in the documentation and updated tailwind.config.js
  8. Included plugin in AdminPanelProvider
  9. Generated a BlogResource and added CuratorPicker & FileUpload to the schema

Screenshot from 2024-05-27 15-06-12

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

  1. create new project, install dependencies
  2. Login as user, go to Media
  3. Attempt to create a new Media model via the form, observe exception
  4. Navigate to Blogs, edit an existing blog
  5. Upload a file to the S3 Upload input, wait for upload, save
  6. Observe no issues
  7. Add media, attempt to upload images via the right-hand side
  8. Observe exception

Reproduction repository

No response

Relevant log output

No response

@SanthoshSivan-Dev SanthoshSivan-Dev added the bug Something isn't working label May 28, 2024
@awcodes awcodes closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants