升级到5135LTS版本

This commit is contained in:
小松树 committed 2019-03-08 11:59:15 +08:00
1 parent 2702108200
commit 8e4b2bdaea
26 files changed
+268 -429

No files matched your search

+5 -5
View File
@@ -20,7 +20,7 @@ class Download extends Response
protected $name;
protected $mimeType;
protected $isContent = false;
protected $openinBrower = false;
protected $openinBrowser = false;
/**
* 处理数据
* @access protected
@@ -53,7 +53,7 @@ class Download extends Response
$this->header['Pragma'] = 'public';
$this->header['Content-Type'] = $mimeType ?: 'application/octet-stream';
$this->header['Cache-control'] = 'max-age=' . $this->expire;
$this->header['Content-Disposition'] = $this->openinBrower ? 'inline' : 'attachment; filename="' . $name . '"';
$this->header['Content-Disposition'] = $this->openinBrowser ? 'inline' : 'attachment; filename="' . $name . '"';
$this->header['Content-Length'] = $size;
$this->header['Content-Transfer-Encoding'] = 'binary';
$this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT';
@@ -138,11 +138,11 @@ class Download extends Response
/**
* 设置是否在浏览器中显示文件
* @access public
* @param bool $openinBrower 是否在浏览器中显示文件
* @param bool $openinBrowser 是否在浏览器中显示文件
* @return $this
*/
public function openinBrower($openinBrower) {
$this->openinBrower = $openinBrower;
public function openinBrowser($openinBrowser) {
$this->openinBrowser = $openinBrowser;
return $this;
}
}