Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
[fix]修复了远程访问webp模式切换错误
Browse files Browse the repository at this point in the history
  • Loading branch information
CberYellowstone committed Sep 30, 2021
1 parent 94a161f commit e17e19e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ function mkJsonIndexForRoot($root){
function sendVideoPicFromMD5($md5){
$parent_md5 = explode("-",$md5)[0];
$video_md5 = explode("-",$md5)[1];
//@ header("Content-Type:image/png");
@ header("Content-Type:image/webp");
if($GLOBALS['able_webp']){
@ header("Content-Type:image/webp");
echo (file_get_contents(($GLOBALS['data_path'].'/'.$parent_md5.'/'.$video_md5.'/'.$video_md5.'.webp')));
} else {
@ header("Content-Type:image/jpeg");
echo (file_get_contents(($GLOBALS['data_path'].'/'.$parent_md5.'/'.$video_md5.'/'.$video_md5.'.jpg')));
}
}
Expand Down

0 comments on commit e17e19e

Please sign in to comment.