Closed ibvodafoneziggo closed 1 year ago
Hey @ibvodafoneziggo! We're sorry to hear that you've hit this issue. 💛
However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?
We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.
Package
filament/forms
Package Version
2.17.53
Laravel Version
10.28.0
Livewire Version
2.12.6
PHP Version
8.2
Problem description
I'm uploading a file to S3 storage that is only accessible by my server, not to the client. When I'm uploading a file it works perfectly and the file is put in the S3 bucket. When previewing the file though, the frontend tries to read the S3 bucket itself, which only the server has access to.
Forms\Components\FileUpload::make('attachments') ->disk(config('storage.driver')) ->directory(config('storage.attachements-directory')) ->visibility(config('storage.storage-bucket-visibility')) ->maxSize(config('storage.max-upload-size')) ->maxFiles(config('storage.max-file-amount')) ->enableDownload() ->multiple()
This is the configuration I'm using, where the disk is an S3 bucket and the visibility is set to
private
. The URL that the frontend is trying to read is the disk configuration url.Expected behavior
I'm expecting the server to act as a proxy to retrieve the file and serve it to the client, but that doesn't seem to be configurable.
Steps to reproduce
Reproduction repository
https://github.com/filamentphp/filament
Relevant log output
No response