diff --git a/src/VueFinder.php b/src/VueFinder.php index 9071cf4..f50a428 100755 --- a/src/VueFinder.php +++ b/src/VueFinder.php @@ -297,9 +297,15 @@ public function download() $path = $this->request->get('path'); $response = $this->streamFile($path); + $filenameFallback = preg_replace( + '#^.*\.#', + md5($path) . '.', $path + ); + $disposition = $response->headers->makeDisposition( ResponseHeaderBag::DISPOSITION_ATTACHMENT, - basename($path) + basename($path), + $filenameFallback ); $response->headers->set('Content-Disposition', $disposition);