Loading src/DownloadController.php +8 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,14 @@ class DownloadController extends ControllerBase { $response->setContentDisposition('inline'); } // Use a default MIME type of 'application/octet-stream'. $response->headers->set('Content-Type', 'application/octet-stream'); // If the file has an associated MIME type, include it in the response. if (!empty($mime_type = $file->getMimeType())) { $response->headers->set('Content-Type', $mime_type); } // Clear the Cache-Control header so it can be calculated automatically. $response->headers->set('Cache-Control', ''); Loading Loading
src/DownloadController.php +8 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,14 @@ class DownloadController extends ControllerBase { $response->setContentDisposition('inline'); } // Use a default MIME type of 'application/octet-stream'. $response->headers->set('Content-Type', 'application/octet-stream'); // If the file has an associated MIME type, include it in the response. if (!empty($mime_type = $file->getMimeType())) { $response->headers->set('Content-Type', $mime_type); } // Clear the Cache-Control header so it can be calculated automatically. $response->headers->set('Cache-Control', ''); Loading