F
Filament12mo ago
sundays

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'])
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?
1 Reply
sundays
sundaysOP12mo ago
somehow it's displaying the uploaded file's size correctly. But the audio element looks like this src="blob:http://localhost/a20101eb-f702-49fb-957d-d19e21f7fb11"
Want results from more Discord servers?
Add your server