Skip to content

Commit ab99bc0

Browse files
committed
feat: add support for txt files (kevinanielsen#120)
1 parent d9171dd commit ab99bc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/internal/handlers/docs/handleDocUpload.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ func HandleDocUpload(c *gin.Context) {
3535
fileType := http.DetectContentType(fileBuffer)
3636

3737
allowedMimeTypes := map[string]bool{
38-
"text/plain": true,
39-
"application/msword": true,
38+
"text/plain": true,
39+
"text/plain; charset=utf-8": true,
40+
"application/msword": true,
4041
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": true,
4142
"application/vnd.openxmlformats-officedocument.presentationml.presentation": true,
4243
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": true,

0 commit comments

Comments
 (0)