mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Remove the Content-Length requirement
This commit is contained in:
parent
e08942fb00
commit
77da3ce5d5
|
|
@ -221,12 +221,6 @@ func (r *uploadRequest) doUpload(
|
|||
|
||||
// Validate validates the uploadRequest fields
|
||||
func (r *uploadRequest) Validate(maxFileSizeBytes config.FileSizeBytes) *util.JSONResponse {
|
||||
if r.MediaMetadata.FileSizeBytes < 1 {
|
||||
return &util.JSONResponse{
|
||||
Code: http.StatusLengthRequired,
|
||||
JSON: jsonerror.Unknown("HTTP Content-Length request header must be greater than zero."),
|
||||
}
|
||||
}
|
||||
if maxFileSizeBytes > 0 && r.MediaMetadata.FileSizeBytes > types.FileSizeBytes(maxFileSizeBytes) {
|
||||
return &util.JSONResponse{
|
||||
Code: http.StatusRequestEntityTooLarge,
|
||||
|
|
|
|||
Loading…
Reference in a new issue