File upload not returning url after upload

I created a form to send a message and attach files, the files upload, but the he data that comes back shows nothing for the data uploaded, so it is returning an empty array

I can't figure out why this happens, please help

code:
Form:
->form([
    TextInput::make('to')->default($this->->user->name.' ('.$this->user->email.')')->disabled(),
    TextInput::make('subject')->required(),
    Textarea::make('message')->required(),
    FileUpload::make('files')->label('Attachments')
            ->directory(fn ($record) => 'message_attachments/'.$record->id)->visibility('private')->multiple()      
]),

Action:
->action(function ($data): void {
      dd($data);
      ...


DD output:
array:3 [▼ // app\Filament\Pages\Message.php:55
  "subject" => "aa"
  "message" => "a"
  "files" => []
]

Env:
FILAMENT_FILESYSTEM_DISK=local
image.png
Was this page helpful?