Upload disk based on configuration

Disk based on config settings
1 Reply
BlackShadow
BlackShadowOP12mo ago
I'm curious about whether it's acceptable to configure the FileUpload:: disk based on project .env settings. While we utilize S3 for production, locally we currently rely on the local file driver.
->disk(config('filesystems.default'))
->disk(config('filesystems.default'))
The local disk generates temp signed URL's.
FileUpload::make('image')
->visibility('private')
->directory('badges')
->openable()
->disk(config('filesystems.default'))
->downloadable()
->image();
FileUpload::make('image')
->visibility('private')
->directory('badges')
->openable()
->disk(config('filesystems.default'))
->downloadable()
->image();
Want results from more Discord servers?
Add your server