In Laravel 8 / livewire 2 app I added spatie/laravel-medialibrary 9, when a preview of selected I make with methods
...
Livewire.on('fileChosen', app_image_id => {
…
I'm updating a project from v6 to v9, and after checking https://github.com/spatie/laravel-medialibrary/blob/master/UPGRADING.md i got this message at postAutoloadDump:
In User.php line 287:
Could not check compatibility between…
I am using Spatie's Media Library (Pro), and we have an SPA that requires all the calls from the front-end to use an auth token with some "context" information.
(Our front-end is Nuxt.js/Vue.js; we send the calls to a micros-service gateway, but…
I am using spatie library to upload some files which will be saved to the storage folder. What I want to accomplished at the moment, is to view those files or images when I am an authenticated user. I've tried creating a symlink using this command…
I am working with Spatie Media library in Laravel ,
I can only get first media url while mentioning conversion type & collection :
$model->getFirstMediaUrl('collection','conversion');
How can I get all of the media with collection and conversion…
Currently I trying to regenerate image from current format .png to default (jpg).. But I notice that I generate new file with new format.. So now have images with format .png and .jpg.. So how can I replace the old format or delete it.. From my…
I am trying to do:
$this->assertFileExists($user->getFirstMedia()->getPath()); In my test. But when I run it I get this error:
BadMethodCallException: Call to undefined method App\Models\User::getFirstMedia().
I do:
use…
I am trying to figure out why my route is throwing a 404 error rather than providing my image. I am using Spatie media library to serve private images.
I have the following routes web.php:
Auth::routes();
Route::get('/home',…
Hi guys I am having trouble setting up Spatie Media Library pro. I am getting following error when I am building my resources with npm run dev
ERROR in…
I am using Spatie's Media Library to upload files.
Then, I allow a user to download a specific set of files by using the following method:
return MediaStream::create('prefix-'.$model->name.'.zip')->addMedia($mediaFiles);
In macOS I download that…
so i am trying to override laravel-medialibrary so that when i run
$modelA
->addMedia($attachment)
->withCustomProperties(['model_id' => $modelA->id])
->toMediaCollection('attachments_a');
, it adds a record into another specified database…
I would like to be able to only upload PDF.
I have seen methods here acceptsFile or acceptsMimeTypes that could do the trick, but it seems that it will give an error at submiting the file.
I was loooking for a way to only be able to select pdf.
With…
Can you please help me this error,i am stuck in that error from two days. i have work in laravel multiple images upload.but whenever i upload the images it will show below error…
In my CustomProduct model I have multiple media's
When I fire a GET request I add the product id & the media id.
When I try the following code below, It's a Eloquent Collection. but I need it to be a Media model because I can't call ->getPath()…
I'm a newbie in spatie. I have some trouble, I don't know how to change collection_name in spatie.
I select a record with collection_name is enter code here and change it to doctor_avatar and I do like:
$media = Media::where(['model_id' => $id,…