From 5b1715c00d69ffc5d42b538572da4f6b530c5c1a Mon Sep 17 00:00:00 2001 From: Rafael Caixeta Date: Sun, 28 Jan 2024 12:43:32 +0100 Subject: [PATCH] feat: add support for txt files (#120) --- src/handlers/docs/handleDocUpload.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/handlers/docs/handleDocUpload.go b/src/handlers/docs/handleDocUpload.go index c0cd5cf..93c179f 100644 --- a/src/handlers/docs/handleDocUpload.go +++ b/src/handlers/docs/handleDocUpload.go @@ -35,8 +35,9 @@ func HandleDocUpload(c *gin.Context) { fileType := http.DetectContentType(fileBuffer) allowedMimeTypes := map[string]bool{ - "text/plain": true, - "application/msword": true, + "text/plain": true, + "text/plain; charset=utf-8": true, + "application/msword": true, "application/vnd.openxmlformats-officedocument.wordprocessingml.document": true, "application/vnd.openxmlformats-officedocument.presentationml.presentation": true, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": true,