From 19660aa44ed853b944b32f2302f598231021dc49 Mon Sep 17 00:00:00 2001 From: amosfolz <33728190+amosfolz@users.noreply.github.com> Date: Tue, 2 Apr 2019 21:52:38 -0400 Subject: [PATCH] Update Sprunje.php Fix for https://github.com/userfrosting/UserFrosting/issues/893 Should prevent file names from exceeding maximum allowed. --- app/sprinkles/core/src/Sprunje/Sprunje.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/sprinkles/core/src/Sprunje/Sprunje.php b/app/sprinkles/core/src/Sprunje/Sprunje.php index b09dc51b4..57d7f59dd 100644 --- a/app/sprinkles/core/src/Sprunje/Sprunje.php +++ b/app/sprinkles/core/src/Sprunje/Sprunje.php @@ -190,7 +190,7 @@ public function toResponse(Response $response) // Prepare response $settings = http_build_query($this->options); $date = Carbon::now()->format('Ymd'); - $response = $response->withAddedHeader('Content-Disposition', "attachment;filename=$date-{$this->name}-$settings.csv"); + $response = $response->withAddedHeader('Content-Disposition', "attachment;filename={$this->name}.csv"); $response = $response->withAddedHeader('Content-Type', 'text/csv; charset=utf-8'); return $response->write($result);