Skip to content

Commit

Permalink
šŸ› Allow "application/octet-stream" content-type for encryped messagesā€¦
Browse files Browse the repository at this point in the history
ā€¦ from mobile.
  • Loading branch information
Danieloni1 committed Jun 3, 2024
1 parent 72360d0 commit 928d428
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/r0/upload_async.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func UploadMediaAsync(r *http.Request, rctx rcontext.RequestContext, user _apime
}

contentType := r.Header.Get("Content-Type")
if contentType == "" {
if contentType == "" || contentType == "application/octet-stream" {
contentType = "application/octet-stream" // binary
} else {
// GK CUSTOMIZATION: Check if the file type is supported
Expand Down
2 changes: 1 addition & 1 deletion api/r0/upload_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func UploadMediaSync(r *http.Request, rctx rcontext.RequestContext, user _apimet
}

contentType := r.Header.Get("Content-Type")
if contentType == "" {
if contentType == "" || contentType == "application/octet-stream" {
contentType = "application/octet-stream" // binary
} else {
// GK CUSTOMIZATION: Check if the file type is supported
Expand Down

0 comments on commit 928d428

Please sign in to comment.