Marco "Mint" Introini
Marco "Mint" Introini
FFilament
Created by Marco "Mint" Introini on 3/4/2024 in #❓┊help
Spatie Media library in Relation Manager
Hi everybody, I have a SpatieMediaLibrary component in a Relation Manager, but I want only to allow downloading files. I have for now:
public function form(Form $form): Form
{
return $form
->schema([
SpatieMediaLibraryFileUpload::make('attachments')
->multiple()
->downloadable()
->columnSpanFull()
->deletable(false)
->label('Attachments')
]);
}
public function form(Form $form): Form
{
return $form
->schema([
SpatieMediaLibraryFileUpload::make('attachments')
->multiple()
->downloadable()
->columnSpanFull()
->deletable(false)
->label('Attachments')
]);
}
It works, but it's not graphically pleasing. I tried with Infolist (even if the best way, I think, is to use a table to show the attachments in a table), but I cannot use the SpatieMediaLibraryFileUpload inside this method. Is there a way to show a graphically pleasant list of all the attached files and allow the user to download them? Thanks a lot!
9 replies