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;