Skip to content

Commit 02f1bdf

Browse files
committed
use new method downloadFileFromStorage
1 parent 081179b commit 02f1bdf

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/Controllers/MailDownloadController.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ public function __invoke(...$arguments)
2121
/** @var \Vormkracht10\Mails\Models\MailAttachment $attachment */
2222
$attachment = $attachmentModel::find($attachment);
2323

24-
$file = Storage::disk($attachment->disk)->path($attachment->storagePath);
25-
26-
return response()->download(
27-
file: $file,
28-
name: $filename,
29-
headers: [
30-
'Content-Type' => $attachment->mime,
31-
]
32-
);
24+
return $attachment->downloadFileFromStorage();
3325
}
3426
}

0 commit comments

Comments
 (0)