mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-03-15 20:49:48 +01: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…
x
Reference in New Issue
Block a user