md5 media file names

This commit is contained in:
HolgerHatGarKeineNode
2023-02-02 15:54:47 +01:00
parent 104ae8c0a6
commit 5d3919466f
8 changed files with 79 additions and 13 deletions

View File

@@ -79,11 +79,15 @@ class Lecturer extends Resource
->sortable(),
Images::make('Avatar', 'avatar')
->conversionOnIndexView('thumb'),
->showStatistics()
->conversionOnIndexView('thumb')
->setFileName(fn($originalFilename, $extension, $model) => md5($originalFilename).'.'.$extension),
Images::make(__('Images'), 'images')
->showStatistics()
->conversionOnIndexView('thumb')
->help('Upload images here to insert them later in the Markdown Description. But you have to save before.'),
->help('Upload images here to insert them later in the Markdown Description. But you have to save before.')
->setFileName(fn($originalFilename, $extension, $model) => md5($originalFilename).'.'.$extension),
Text::make('Name')
->rules('required', 'string'),