From 928d428009dc8c0bacfa2714df0e89d6ea75bfe9 Mon Sep 17 00:00:00 2001 From: Daniel Aloni Date: Mon, 3 Jun 2024 15:12:05 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Allow=20"application/octet-strea?= =?UTF-8?q?m"=20content-type=20for=20encryped=20messages=20from=20mobile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/r0/upload_async.go | 2 +- api/r0/upload_sync.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/r0/upload_async.go b/api/r0/upload_async.go index 80eb5255..f6d15111 100644 --- a/api/r0/upload_async.go +++ b/api/r0/upload_async.go @@ -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 diff --git a/api/r0/upload_sync.go b/api/r0/upload_sync.go index 826499ee..e1fd619c 100644 --- a/api/r0/upload_sync.go +++ b/api/r0/upload_sync.go @@ -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