diff --git a/src/controllers/AdminController.php b/src/controllers/AdminController.php index 175859f93..01bdfb329 100644 --- a/src/controllers/AdminController.php +++ b/src/controllers/AdminController.php @@ -433,13 +433,10 @@ public function displayFile() //get the stored path of the original $path = $this->request->input('path'); $data = Storage::get($path); - $file = new SFile($path); - $headers = array( - 'Content-Type' => $file->getMimeType(), - 'Content-Length' => $file->getSize(), - 'Content-Disposition' => 'attachment; filename="' . $file->getFilename() . '"' - ); + $headers = [ + 'Content-Length' => Storage::size($path), + ]; return response()->make($data, 200, $headers); }