Merge pull request !58 from Hmily_LCG/fix—X-sendfile

This commit is contained in:
Hmily_LCG 2017-03-08 15:29:21 +08:00 committed by Discuz!
commit 509b61f940
1 changed files with 3 additions and 0 deletions

View File

@ -259,6 +259,9 @@ dheader('Content-Length: '.$filesize);
$xsendfile = getglobal('config/download/xsendfile');
if(!empty($xsendfile)) {
$type = intval($xsendfile['type']);
if($isimage){
$type = 0;
}
$cmd = '';
switch ($type) {
case 1: $cmd = 'X-Accel-Redirect'; $url = $xsendfile['dir'].$attach['attachment']; break;