正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -27,7 +27,7 @@ class Attachment extends Base { | @@ -27,7 +27,7 @@ class Attachment extends Base { | ||
27 | if(file_exists($filename)){ | 27 | if(file_exists($filename)){ |
28 | $file = new \SplFileInfo($filename); | 28 | $file = new \SplFileInfo($filename); |
29 | if(in_array($file->getExtension(),['jpg','jpeg','png','gif','mp4','mp3','pdf','txt','doc','docx','xls','xlsx','ppt','pptx','eml'])){ | 29 | if(in_array($file->getExtension(),['jpg','jpeg','png','gif','mp4','mp3','pdf','txt','doc','docx','xls','xlsx','ppt','pptx','eml'])){ |
30 | - app()->header("Content-Type",$file->getMTime()); | 30 | + app()->header("Content-Type",$file->getType()); |
31 | app()->header("Content-Disposition","inline; filename=".$file->getFilename()); | 31 | app()->header("Content-Disposition","inline; filename=".$file->getFilename()); |
32 | app()->header("Content-Transfer-Encoding","binary"); | 32 | app()->header("Content-Transfer-Encoding","binary"); |
33 | app()->header("Accept-Ranges","bytes"); | 33 | app()->header("Accept-Ranges","bytes"); |
-
请 注册 或 登录 后发表评论