Emmanuel71
How to use a custom path with spatie media library plugin?
Anyone who has found how to use a custom directory structure with SpatieMediaLibraryFileUpload in a filament form? As stated in the filament manual, the directory() option doesn't work with SpatieMediaLibraryFileUpload.
I want to use this to create a directory structure per year and month for my attachments. So for example, instead of 'public/1/abc.jpg', it would be 'public/202411/1/abc.jpg'
In spatie media library there's an option to use a path generator as described here: https://spatie.be/docs/laravel-medialibrary/v11/advanced-usage/using-a-custom-directory-structure
But I can't get this to work inside the filament plugin because the path generator functionality seems to be missing from the plugin. Any ideas?
13 replies
In spatie media library plugin (official) I have an issue with image quality and image editor
I'm using following form field:
SpatieMediaLibraryFileUpload::make('attachments')
->collection('attachments')
->multiple()
->openable()
->reorderable()
->imageEditor()
->imageResizeMode('cover')
->imageResizeTargetWidth('900')
->acceptedFileTypes(['image/jpeg', 'image/png', 'image/gif', 'application/pdf'])
->panelLayout('grid')
Issue 1: Just after uploading the image, it looks fine in the form field. When coming back to the form after navigating around. The images look blurry and zoomed too close.
Issue 2: When using the imageResizeTargetWidth option in combination with the imageEditor option, I cannot use the selection rectangle of the image editor anymore, it's height is 0 and I cannot resize it.
Anyone ran into these issues too? Txh!
1 replies
css of select field not working anymore
Using filament 3.2 in Laravel 10, the css of the select dropdown is not applied anymore to the item list. No errors in browser console or network tab.
Moving back to the commit where it still works does not help me, as it seems nothing related to css was changed there.
Here's some extra info:
Any ideas? Thx.
9 replies
Filament on offline production server: blank components
I'm new to filament and it works great in my development environment. But I'm having trouble to make filament work well on our production server. The setup is unconventional because there is no internet connection in the production environment. Also, the project needs to run in a subfolder of the webserver (eq: https://webserver/laravel-project1). Development is done in a separate environment with internet connection. The vendor folder is being zipped and moved over to production manually, as is the 'build' folder. The laravel app works, except for the filament admin panel. The menu items of the resources are displayed, but when clicked, a gateway timeout eventually occurs and there are no errors in the browser console. Also on the homepage of the dashboard, all cards are displayed empty. Obviously, something is missing or not being found... . Any pointers to get me in the right direction? I already did the basics mentioned in the forum rules. Thx.
9 replies