From aea5c474dbc0cdc466c5201effd49baaff720f67 Mon Sep 17 00:00:00 2001 From: Devonte W Date: Thu, 23 Feb 2023 19:19:58 +0000 Subject: [PATCH] fix(resources/api): allow svg xml format (#4705) --- resources/scripts/api/transformers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/api/transformers.ts b/resources/scripts/api/transformers.ts index 4ed9a5df5a..f2bea86d0f 100644 --- a/resources/scripts/api/transformers.ts +++ b/resources/scripts/api/transformers.ts @@ -47,7 +47,7 @@ export const rawDataToFileObject = (data: FractalResponseData): FileObject => ({ isEditable: function () { if (this.isArchiveType() || !this.isFile) return false; - const matches = ['application/jar', 'application/octet-stream', 'inode/directory', /^image\//]; + const matches = ['application/jar', 'application/octet-stream', 'inode/directory', /^image\/(?!svg\+xml)/]; return matches.every((m) => !this.mimetype.match(m)); },