diff options
Diffstat (limited to 'mediaapi/routing/download.go')
-rw-r--r-- | mediaapi/routing/download.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mediaapi/routing/download.go b/mediaapi/routing/download.go index 017fcfa3..39b86b44 100644 --- a/mediaapi/routing/download.go +++ b/mediaapi/routing/download.go @@ -685,7 +685,7 @@ func (r *downloadRequest) GetContentLengthAndReader(contentLengthHeader string, r.Logger.WithError(parseErr).Warn("Failed to parse content length") return 0, nil, fmt.Errorf("strconv.ParseInt: %w", parseErr) } - if parsedLength > int64(maxFileSizeBytes) { + if maxFileSizeBytes > 0 && parsedLength > int64(maxFileSizeBytes) { return 0, nil, fmt.Errorf( "remote file size (%d bytes) exceeds locally configured max media size (%d bytes)", parsedLength, maxFileSizeBytes, |