]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/FileController.php
File upload deletion complete & added extension handling
[bookstack] / app / Http / Controllers / FileController.php
index 4cdcf66dceb8dafac6fd31d8f864b79b8593c4dd..2518d6cd31004130f1f34644018c87ca8d02b1e0 100644 (file)
@@ -196,7 +196,7 @@ class FileController extends Controller
         $fileContents = $this->fileService->getFile($file);
         return response($fileContents, 200, [
             'Content-Type' => 'application/octet-stream',
-            'Content-Disposition' => 'attachment; filename="'. $file->name .'"'
+            'Content-Disposition' => 'attachment; filename="'. $file->getFileName() .'"'
         ]);
     }