Skip to content
Snippets Groups Projects
Commit 700c8312 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add file size and description into download wrapper

parent 680d4bac
No related branches found
No related tags found
No related merge requests found
......@@ -535,15 +535,19 @@ else // Open and return file
// Les drois sont ok et fichier trouve, on l'envoie
header('Content-Description: File Transfer');
if ($encoding) header('Content-Encoding: '.$encoding);
if ($type) header('Content-Type: '.$type.(preg_match('/text/',$type)?'; charset="'.$conf->file->character_set_client:''));
if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
else header('Content-Disposition: inline; filename="'.$filename.'"');
header('Content-Length: ' . dol_filesize($original_file));
// Ajout directives pour resoudre bug IE
header('Cache-Control: Public, must-revalidate');
header('Pragma: public');
//ob_clean();
//flush();
readfile($original_file_osencoded);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment