From 67ea2da57e0f0d47d98ed3ee8513f0277d9c1ba9 Mon Sep 17 00:00:00 2001 From: Artur Wierzbicki Date: Mon, 18 Jul 2022 14:36:54 +0400 Subject: [PATCH] Storage: fix svg upload (#52395) --- pkg/services/store/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/store/http.go b/pkg/services/store/http.go index 9f207d9a7a1..2523e500bc0 100644 --- a/pkg/services/store/http.go +++ b/pkg/services/store/http.go @@ -110,7 +110,7 @@ func (s *httpStorage) Upload(c *models.ReqContext) response.Response { entityType := EntityTypeJSON mimeType := http.DetectContentType(data) - if strings.HasPrefix(mimeType, "image") { + if strings.HasPrefix(mimeType, "image") || strings.HasSuffix(path, ".svg") { entityType = EntityTypeImage }