F
Filament2y ago
xy

SpatieMediaLibraryFileUpload: Display original file name

Hi Any ideas on how I can display the original file name when using SpatieMediaLibraryFileUpload? On upload it says original file name but when editing the file field, it shows stored file name.
Forms\Components\SpatieMediaLibraryFileUpload::make('file
->disk('local')
->collection('files')
->multiple(false)
->previewable(false)
->required(),
Forms\Components\SpatieMediaLibraryFileUpload::make('file
->disk('local')
->collection('files')
->multiple(false)
->previewable(false)
->required(),
7 Replies
awcodes
awcodes2y ago
->preserveFileNames() maybe.
xy
xyOP2y ago
that didn't work
awcodes
awcodes2y ago
Might be preserveFilenames(), lowercase n
xy
xyOP2y ago
The method name is preserveFilenames, however it didn't resolve my issue
awcodes
awcodes2y ago
I think there was another help thread with a similar topic. May be some info in there that is helpful. If I find it I’ll post the link.
xy
xyOP2y ago
bump
awcodes
awcodes2y ago
Not you’re exact issue but maybe something in here can help. https://discord.com/channels/883083792112300104/1146986698576769076

Did you find this page helpful?