Skip to content

Commit

Permalink
Update Sprunje.php
Browse files Browse the repository at this point in the history
Fix for userfrosting#893
Should prevent file names from exceeding maximum allowed.
  • Loading branch information
amosfolz authored Apr 3, 2019
1 parent d312d1f commit 19660aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/sprinkles/core/src/Sprunje/Sprunje.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 19660aa

Please sign in to comment.