ryfy
ryfy
FFilament
Created by ryfy on 9/21/2023 in #❓┊help
FileUpload disk and storeFileNamesIn settings not working
Hey there. I'm using the following field configuration:
Forms\Components\FileUpload::make('documents')
->disk('private')
->multiple(true)
->storeFileNamesIn('document_filenames')
->acceptedFileTypes(['application/pdf'])
->minFiles(1)
->maxSize(12288)
Forms\Components\FileUpload::make('documents')
->disk('private')
->multiple(true)
->storeFileNamesIn('document_filenames')
->acceptedFileTypes(['application/pdf'])
->minFiles(1)
->maxSize(12288)
In my config/filesystems.php I have this configuration:
'private' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'visibility' => 'private',
'throw' => false,
],
'private' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'visibility' => 'private',
'throw' => false,
],
The problems are these: 1. The file does not get saved to the private directory, it gets saved to the app directory as if the 'local' disk was chosen 2. The storeFileNamesIn value never works, there is no document_filenames in the data values. Any ideas?
11 replies