spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.78k stars 1.08k forks source link

Preview On Collection - S3 - URGENT #3714

Closed beneyraheem closed 1 month ago

beneyraheem commented 1 month ago
<livewire:media-library collection="test" :model="$test" wire:model="photo" max-items="1" rules="mimes:jpg,jpeg,png|max:6144" />

Photo is uploaded to S3, when displaying collection, preview is not loading.

I couldn't find relating this on PRO documents.

timvandijck commented 1 month ago

Hey @beneyraheem, I'm sorry you are experiencing trouble.

Due to a limitation in Livewire the collection Livewire plugin does not support uploading multiple files directly to S3: https://spatie.be/docs/laravel-medialibrary-pro/v6/livewire/attachments

I would recommend trying to use the component in "attachment"-mode (without the collection attribute) like this: https://spatie.be/docs/laravel-medialibrary-pro/v6/livewire/attachments