laravel-medialibrary: Conversion fails after upload to S3 using MediaLibary Pro
Details
- Laravel 9.5.1
- Media Library Pro 2.1.8.
I’ve been struggling with getting conversions running after uploading a file to S3. The file is upload just fine, but I get the error **Unsupported image type application/x-empty. GD driver is only able to decode JPG, PNG, GIF, BMP or WebP files.**
immediately following the post.
When I check the media
table after the initial temporary upload, all data is there; however, after submitting and therefore uploading to s3, the mime_type
is application/x-empty
and 'size` is 0. I’m assuming the size missing creates the error in mime-type detection.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 35 (10 by maintainers)
Great! Going to close this issue as it seems to be resolved. I’ll improve our docs on this point soon.
I’ll try to look into this soon. Feel free to open a PR if you already know the solution and want it to be released quickly 👍
Hey! I deleted my media-library and media-library-pro vendor directories and reinstalled. I removed the ACL setting in config per @martin-ro but still didn’t work.
Then…
I had my
config/livewire
temporary_file_upload.disk
set to s3, per the instructions on working with Livewire. I reverted tonull
and voila, worked like a charm!For reference: here it mentions following Livewire’s setup for S3. Following that link, I implemented the setup as discussed here. Undoing this change fixed it.
It works for me after installing the specific package versions with AWS S3.
I tried downgrading to media library to 10.2.0 but the issue still persisted, I had to downgrade to 10.1.5 and it’s now working fine, so something that was changed between 10.1.5 and 10.2.0 is causing the issue.
I am also having this same issue with S3