diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts
index 8560c0e1ef..379dc1f842 100644
--- a/src/server/proxy/proxy-media.ts
+++ b/src/server/proxy/proxy-media.ts
@@ -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 {
diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts
index 3fa375e8d4..5b082a4fa4 100644
--- a/src/services/drive/add-file.ts
+++ b/src/services/drive/add-file.ts
@@ -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 {