Merge branch 'develop' of https://github.com/syuilo/misskey into develop

This commit is contained in:
syuilo 2019-03-05 08:24:26 +09:00
commit a1f3323fa5
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 10 additions and 2 deletions

View file

@ -101,7 +101,11 @@ async function detectMine(path: string) {
readable.destroy();
const type = fileType(buffer);
if (type) {
if (type.mime == 'application/xml' && checkSvg(path)) {
res(['image/svg+xml', 'svg']);
} else {
res([type.mime, type.ext]);
}
} else if (checkSvg(path)) {
res(['image/svg+xml', 'svg']);
} else {

View file

@ -310,7 +310,11 @@ export default async function(
readable.destroy();
const type = fileType(buffer);
if (type) {
if (type.mime == 'application/xml' && checkSvg(path)) {
res(['image/svg+xml', 'svg']);
} else {
res([type.mime, type.ext]);
}
} else if (checkSvg(path)) {
res(['image/svg+xml', 'svg']);
} else {