Merge pull request !58 from Hmily_LCG/fix—X-sendfile
This commit is contained in:
commit
509b61f940
|
@ -259,6 +259,9 @@ dheader('Content-Length: '.$filesize);
|
||||||
$xsendfile = getglobal('config/download/xsendfile');
|
$xsendfile = getglobal('config/download/xsendfile');
|
||||||
if(!empty($xsendfile)) {
|
if(!empty($xsendfile)) {
|
||||||
$type = intval($xsendfile['type']);
|
$type = intval($xsendfile['type']);
|
||||||
|
if($isimage){
|
||||||
|
$type = 0;
|
||||||
|
}
|
||||||
$cmd = '';
|
$cmd = '';
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1: $cmd = 'X-Accel-Redirect'; $url = $xsendfile['dir'].$attach['attachment']; break;
|
case 1: $cmd = 'X-Accel-Redirect'; $url = $xsendfile['dir'].$attach['attachment']; break;
|
||||||
|
|
Loading…
Reference in New Issue