mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-08 18:16:59 +00:00
0️⃣ Media API: Fix maxFileSizeBytes=0 handling (#1993)
This commit is contained in:
parent
1ec5b0709b
commit
5b969d172b
@ -737,7 +737,7 @@ func (r *downloadRequest) fetchRemoteFile(
|
|||||||
return "", false, parseErr
|
return "", false, parseErr
|
||||||
}
|
}
|
||||||
|
|
||||||
if contentLength > int64(maxFileSizeBytes) {
|
if maxFileSizeBytes > 0 && contentLength > int64(maxFileSizeBytes) {
|
||||||
// TODO: Bubble up this as a 413
|
// TODO: Bubble up this as a 413
|
||||||
return "", false, fmt.Errorf("remote file is too large (%v > %v bytes)", contentLength, maxFileSizeBytes)
|
return "", false, fmt.Errorf("remote file is too large (%v > %v bytes)", contentLength, maxFileSizeBytes)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user