Skip to content

Commit 745fdd8

Browse files
committed
downloadable button is configurable
1 parent 108fd64 commit 745fdd8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/media/config/media.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,10 @@
8989
'append_files' => true,
9090
],
9191
],
92+
93+
'modal' => [
94+
'resource' => [
95+
'show_download_button' => false,
96+
],
97+
],
9298
];

packages/media/src/Resources/MediaResource.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ public static function table(Table $table): Table
567567
\Filament\Tables\Actions\Action::make('download')
568568
->label(__('media::fields.download_file'))
569569
->icon('heroicon-m-arrow-down-tray')
570+
->visible(fn() => config('media.modal.resource.show_download_button', true))
570571
->action(function (Media $record) {
571572
return response()->download(
572573
$record->getPath(),

0 commit comments

Comments
 (0)