aboutsummaryrefslogtreecommitdiff
path: root/mediaapi
diff options
context:
space:
mode:
authorFero <ferologics@users.noreply.github.com>2021-04-19 17:29:51 +0200
committerGitHub <noreply@github.com>2021-04-19 16:29:51 +0100
commitd6e9b7b307ff0d7541046ec33890d49239c7a6ca (patch)
tree0944c5be079016efe299ec19fa80a72f982ed34f /mediaapi
parenta9faa1bc4488412f42d4926ab76b35f53cd008cd (diff)
Remove the 'Content-Type' request header requirement (#1834)
Diffstat (limited to 'mediaapi')
-rw-r--r--mediaapi/routing/upload.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/mediaapi/routing/upload.go b/mediaapi/routing/upload.go
index a38b56e0..f1dd231d 100644
--- a/mediaapi/routing/upload.go
+++ b/mediaapi/routing/upload.go
@@ -237,13 +237,6 @@ func (r *uploadRequest) Validate(maxFileSizeBytes config.FileSizeBytes) *util.JS
if maxFileSizeBytes > 0 && r.MediaMetadata.FileSizeBytes > types.FileSizeBytes(maxFileSizeBytes) {
return requestEntityTooLargeJSONResponse(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,