Set content-disposition 'attachment' for both local and S3 downloads. Added a bunch of tests. Fixes #1148.

This commit is contained in:
Andrew Herron
2026-07-30 17:21:51 +10:00
committed by Gregor Vostrak
parent ed3ba0135b
commit 453d5ed066
7 changed files with 287 additions and 3 deletions

View File

@@ -28,7 +28,9 @@ class ExportController extends Controller
$filepath = $exportService->export($organization);
$downloadUrl = Storage::disk(config('filesystems.private'))
->temporaryUrl($filepath, Carbon::now()->addMinutes(10));
->temporaryUrl($filepath, Carbon::now()->addMinutes(10), [
'ResponseContentDisposition' => 'attachment; filename="'.basename($filepath).'"',
]);
return new JsonResponse([
'success' => true,