1
0
mirror of https://github.com/prasathmani/tinyfilemanager.git synced 2025-07-31 22:10:59 +02:00

fix download Content-Type header (#770)

This commit is contained in:
mclorch
2022-04-11 04:09:51 -04:00
committed by GitHub
parent 13b2bd0164
commit a65f8ff8b5

View File

@@ -3058,9 +3058,14 @@ function fm_download_file($fileLocation, $fileName, $chunkSize = 1024)
$extension = pathinfo($fileName, PATHINFO_EXTENSION);
$contentType = fm_get_file_mimes($extension);
if(is_array($contentType)) {
$contentType = implode(' ', $contentType);
}
header("Cache-Control: public");
header("Content-Transfer-Encoding: binary\n");
header('Content-Type: $contentType');
header("Content-Type: $contentType");
$contentDisposition = 'attachment';