czehnter
czehnter
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I also tried using the default FileUpload field instead and it doesn't work there either. I also found someone else with the same problem, so at least I'm not alone 😅 https://github.com/filamentphp/filament/issues/12368
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I tested different disks, but the result is always the same. I also tried using the documented method for custom names and then just returning the original name in it, but this also doesn't change anything:
->getUploadedFileNameForStorageUsing(
fn(TemporaryUploadedFile $file): string => (string) str($file->getClientOriginalName()),
)
->getUploadedFileNameForStorageUsing(
fn(TemporaryUploadedFile $file): string => (string) str($file->getClientOriginalName()),
)
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I was referring to the filename in storage, I'm not using ->downloadable(). So with this config, the files won't be renamed on the storage in your environment?
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
I might be wrong, but I don't think the Spatie Media Library is renaming files by default. It seems like it is the standard filament behaviour and preserveFilenames() is just not working.
12 replies
FFilament
Created by czehnter on 1/14/2025 in #❓┊help
preserveFilenames() not working with SpatieMediaLibraryFileUpload
No luck, it was already at the end.
12 replies
FFilament
Created by czehnter on 12/11/2024 in #❓┊help
How to use all available Tailwind classes in custom ViewRecord page?
Importing forms and typography definitely helped. But it seems like once I add ->viteTheme(), the color palette defined with ->colors() doesn't work anymore, so all the colored buttons etc. in the panel are broken.
5 replies
FFilament
Created by czehnter on 11/8/2024 in #❓┊help
Toggle buttons not working in form integrated in custom ViewRecord page
The solution seems to be that all Toggle elements have to be defined in the ViewRecord class like this: public ?array $data = ['removal' => false]
2 replies
FFilament
Created by czehnter on 9/25/2024 in #❓┊help
Triggering afterStateUpdated() with $set()?
Ah it actually does. Thanks, I somehow missed that. Is there any other way to do this apart from using afterStateUpdated()?
7 replies