ghostrockz3d
Custom model for spatie media library upload and spatie settings
I want to upload a media (favicon) on laravel settings but it seems they don't work with each other so I thought I create another model called MediaSetting
this is the migration notice it's the same schema as spatie laravel settings
And here's my SeoSettings
and so on here's the important part
Isn't it possible to pass the model (MediaSetting) and it uses this one for file uploads ?
I would appreciate any help
2 replies
Spatie media library not Saving on S3
Hello I'm using spatie media library to save images on s3 disk
Right now I'm using minio for testing in development
This is my form Code:
This is my model:
Here's my aws .env file:
I can see in my network tab that file gets uploaded correctly to localhost:9000(minio) and I can see it's in tmp folder
But laravel media library is not saving the uploaded data in the db so it feels like user hasn't uploaded anything
When I use public file system driver it works like a charm but when I use S3 it's not working correctly
I would appreciate if anyone could help me
3 replies
File Upload
I'm trying to configure file upload to work with imagekit
I Created a new Adapter for FileSystem that uses ImageKit behind the scene
At First I tried to use the default settings
But the problem is the image is stuck in /livewire-tmp and it doesn't move it to the narrators folder
Then I tried this :
But the problem is I cannot move the file from /livewire-tmp to my folder and I ran Storage::fileExists and it seems file doesn't exists even If I use $file->exists() it returns false
But I can see the fine exists in image kit
I don't know how to fix this I would appreciate it if anyone could help
21 replies