Skip to content

Commit

Permalink
added support to upload zip file in documents (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
unamdev0 authored Aug 29, 2024
1 parent affbe23 commit 2ea6b96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/handlers/docs/handleDocUpload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/docs-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const DocsInput: React.FC<{
for (let file of fileRef.current.files) {
names.push(file.name);
}

setFileNames(names);
}
};
Expand All @@ -28,7 +28,7 @@ const DocsInput: React.FC<{
<input
onChange={getFileNames}
type="file"
accept="text/plain, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/pdf, application/rtf, application/x-freearc"
accept="text/plain,application/zip, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/pdf, application/rtf, application/x-freearc"
multiple
name="document"
id="document"
Expand Down

0 comments on commit 2ea6b96

Please sign in to comment.