From 2ea6b9671bc328b80a99ae6cc02e9b866e7db9d5 Mon Sep 17 00:00:00 2001 From: Udit Namdev <35065474+unamdev0@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:33:46 +0530 Subject: [PATCH] added support to upload zip file in documents (#140) --- src/handlers/docs/handleDocUpload.go | 1 + ui/src/components/docs-input.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/handlers/docs/handleDocUpload.go b/src/handlers/docs/handleDocUpload.go index e531f2e..9353c4b 100644 --- a/src/handlers/docs/handleDocUpload.go +++ b/src/handlers/docs/handleDocUpload.go @@ -45,6 +45,7 @@ func HandleDocUpload(c *gin.Context) { "application/pdf": true, "application/rtf": true, "application/x-freearc": true, + "application/zip": true, } if !allowedMimeTypes[fileType] { diff --git a/ui/src/components/docs-input.tsx b/ui/src/components/docs-input.tsx index ceaec0d..c899022 100644 --- a/ui/src/components/docs-input.tsx +++ b/ui/src/components/docs-input.tsx @@ -13,7 +13,7 @@ const DocsInput: React.FC<{ for (let file of fileRef.current.files) { names.push(file.name); } - + setFileNames(names); } }; @@ -28,7 +28,7 @@ const DocsInput: React.FC<{