Open Ringhoo opened 2 weeks ago
Hi, I have the following field in laravel nova resource:
Files::make(__('Files'), 'downloadable') ->setFileName(function ($originalFilename, $extension, $model) { return Str::slug($model->name) . '-' . md5($originalFilename) . '.' . $extension; }) ->singleMediaRules(['max:'.$maxfilesize]),
It is working fine, however the field is displaying all files using their filename, which I just modified to a md5 hash, as shown on the image below.
It is not very friendly for a user. So my question is, is it possible to display the files using their name instead of the filename?
Hi, I have the following field in laravel nova resource:
It is working fine, however the field is displaying all files using their filename, which I just modified to a md5 hash, as shown on the image below.
It is not very friendly for a user. So my question is, is it possible to display the files using their name instead of the filename?