Skip to content

Commit 60cd00a

Browse files
committedJan 16, 2025··
feat: increase maximum file size limit for attachments to 10MB
1 parent 9f8555b commit 60cd00a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎server/api/messages.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ func postAttachmentHandler(writer http.ResponseWriter, request *http.Request) {
365365
}
366366

367367
size := request.ContentLength
368-
if size > 1024*1024 {
368+
var _10MB int64 = 1024 * 1024 * 10
369+
if size > _10MB {
369370
http.Error(writer, "File size is too large", http.StatusBadRequest)
370371
return
371372
}

‎server/api/users.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ func postUserPictureHandler(writer http.ResponseWriter, request *http.Request) {
219219
}
220220

221221
size := request.ContentLength
222-
if size > 1024*1024 {
222+
var _10MB int64 = 1024 * 1024 * 10
223+
if size > _10MB {
223224
http.Error(writer, "File size is too large", http.StatusBadRequest)
224225
return
225226
}

0 commit comments

Comments
 (0)
Please sign in to comment.