From 496efe07064da5f56878dd5bb892128529c36633 Mon Sep 17 00:00:00 2001 From: ferologics Date: Wed, 14 Apr 2021 11:22:22 +0200 Subject: [PATCH] Remove the 'Content-Type' request header requirement --- mediaapi/routing/upload.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mediaapi/routing/upload.go b/mediaapi/routing/upload.go index 2c5753745..02e7112a7 100644 --- a/mediaapi/routing/upload.go +++ b/mediaapi/routing/upload.go @@ -233,13 +233,6 @@ func (r *uploadRequest) Validate(maxFileSizeBytes config.FileSizeBytes) *util.JS JSON: jsonerror.Unknown(fmt.Sprintf("HTTP Content-Length is greater than the maximum allowed upload size (%v).", maxFileSizeBytes)), } } - // TODO: Check if the Content-Type is a valid type? - if r.MediaMetadata.ContentType == "" { - return &util.JSONResponse{ - Code: http.StatusBadRequest, - JSON: jsonerror.Unknown("HTTP Content-Type request header must be set."), - } - } if strings.HasPrefix(string(r.MediaMetadata.UploadName), "~") { return &util.JSONResponse{ Code: http.StatusBadRequest,