From 5ef05f81b66b7f168c6e04a99824f4e34699ca6a Mon Sep 17 00:00:00 2001 From: Brooke Bryan Date: Fri, 29 Jan 2021 09:28:19 +0000 Subject: [PATCH] Disposition ext --- src/Dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dispatch.php b/src/Dispatch.php index 0661a6d..dace92f 100644 --- a/src/Dispatch.php +++ b/src/Dispatch.php @@ -296,7 +296,7 @@ public function handleRequest(Request $request): Response $response = ResourceFactory::create($resource, $contentHashMatch ? $this->_defaultCacheConfig : false); if(BitWise::has($this->getBits(), self::FLAG_CONTENT_ATTACHMENT)) { - $filename = pathinfo($fullPath, PATHINFO_FILENAME); + $filename = pathinfo($fullPath, PATHINFO_FILENAME) . '.' . $ext; $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '"'); } return $response;