mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-06 15:46:37 +02:00
fix download Content-Type header (#770)
This commit is contained in:
parent
13b2bd0164
commit
a65f8ff8b5
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in a new issue