S3 FileUpload tries to load preview from localhost

Forms\Components\FileUpload::make('file')
                    ->required()
                    ->label('Message file')
                    ->disk('messages')
                    ->maxSize(1024 * 20)
                    ->acceptedFileTypes(['audio/mpeg'])


When I use Storage::disk('messages')->url(); with the file name stored in the database I get the correct URL back to the s3 bucket. But in the admin panel, filament seems to be trying to load the file from localhost no matter what I do. I tried setting visibility to 'public' or 'private' but that didn't help. My ACL is disabled. AWS_URL is set and the disk filesystem is configured correctly, any ideas?
Was this page helpful?