mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 04:03:49 +01:00
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
e3ea79d4a4
@ -101,7 +101,11 @@ async function detectMine(path: string) {
|
||||
readable.destroy();
|
||||
const type = fileType(buffer);
|
||||
if (type) {
|
||||
res([type.mime, type.ext]);
|
||||
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 {
|
||||
|
@ -310,7 +310,11 @@ export default async function(
|
||||
readable.destroy();
|
||||
const type = fileType(buffer);
|
||||
if (type) {
|
||||
res([type.mime, type.ext]);
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user