Skip to content

Commit ebb6e30

Browse files
wip
1 parent ced20fe commit ebb6e30

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

app/Filament/Exports/ExcelExportWithNotificationInDB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function export()
3636
$authUser = auth()->user();
3737

3838
$this
39-
->queueExport($filename, 's3private', $this->getWriterType())
39+
->queueExport($filename, config('filament.filament-excel-disk'), $this->getWriterType())
4040
->chain([
4141
function () use ($authUser, $filename) {
4242
Notification::send(

app/Notifications/Admin/ExportExcelNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function toMail(object $notifiable): MailMessage
4848
return (new MailMessage)
4949
->subject(__('notification.export_finished.title'))
5050
->line(__('notification.export_finished.body'))
51-
->attach(Storage::disk('s3private') . $this->filename)
51+
->attach(Storage::disk(config('filament.filament-excel-disk'))->path($this->filename))
5252
->action(__('notification.export_finished.action'), $this->generateURL());
5353
}
5454

config/filament.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@
291291

292292
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DRIVER', 'public'),
293293

294+
'filament-excel-disk' => env('FILAMENT_EXCEL_DISK', 'filament-excel'),
295+
294296
/*
295297
|--------------------------------------------------------------------------
296298
| Google Fonts

config/filesystems.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,21 @@
7878
'visibility' => 'private',
7979
],
8080

81+
'filament-excel' => [
82+
'driver' => 's3',
83+
'key' => env('AWS_ACCESS_KEY_ID'),
84+
'secret' => env('AWS_SECRET_ACCESS_KEY'),
85+
'token' => env('AWS_SESSION_TOKEN'),
86+
'region' => env('AWS_DEFAULT_REGION'),
87+
'bucket' => env('AWS_BUCKET'),
88+
'url' => env('AWS_URL'),
89+
'endpoint' => env('AWS_ENDPOINT'),
90+
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
91+
'throw' => false,
92+
'root' => env('AWS_PUBLIC_BUCKET_ROOT', ''),
93+
'visibility' => 'private',
94+
],
95+
8196
],
8297

8398
/*

0 commit comments

Comments
 (0)