Skip to content

Commit

Permalink
fix: 🐛 svg文件content-type补充
Browse files Browse the repository at this point in the history
  • Loading branch information
aoaostar committed Oct 18, 2022
1 parent c64a182 commit d207b7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,14 @@ function get_content_type($filename)
case 'js':
$mime_type = 'application/javascript';
break;
case 'svg':
$mime_type = 'image/svg+xml';
break;
default:
$f_open = finfo_open(FILEINFO_MIME_TYPE);
$mime_type = finfo_file($f_open, $filename);
finfo_close($f_open);
}

return $mime_type;
}
}
Expand Down

0 comments on commit d207b7e

Please # to comment.