Skip to content

Commit

Permalink
refactor: disable file uploads for presentation content fields
Browse files Browse the repository at this point in the history
See #1
  • Loading branch information
alkrauss48 committed Feb 16, 2024
1 parent c767204 commit 06e17c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/Filament/Resources/PresentationResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ public static function form(Form $form): Form
.'You can toggle your theme in the top right menu.'
))->columnSpan([
'md' => 2,
]),
])->disableToolbarButtons([
'attachFiles',
])->saveUploadedFileAttachmentsUsing(function () {
// Block images from being uploaded.
// This prevents drag-and-drop uploads.
return null;
})->getUploadedAttachmentUrlUsing(function () {
// Required to go along with a null `saveUploadedFileAttachmentsUsing`
return null;
}),
Section::make('Details')
->description('All the metadata related to your presentation.')
->columnSpan(1)
Expand Down

0 comments on commit 06e17c8

Please sign in to comment.