element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
46 stars 7 forks source link

Media fails to load when `media_api.max_file_size_bytes = 0` #1880

Closed matrixbot closed 4 weeks ago

matrixbot commented 4 weeks ago

This issue was originally created by @database64128 at https://github.com/matrix-org/dendrite/issues/1880.

Background information

Description

This might be a regression introduced by #1537. See https://github.com/matrix-org/dendrite/pull/1537/files#r654757018

Steps to reproduce

Set media_api.max_file_size_bytes to 0. All media downloads fail with {"errcode":"M_NOT_FOUND","error":"Failed to download: r.fetchRemoteFileAndStoreMetadata: remote file size (180325 bytes) exceeds locally configured max media size (0 bytes)"}.

matrixbot commented 4 weeks ago

This comment was originally posted by @database64128 at https://github.com/matrix-org/dendrite/issues/1880#issuecomment-864365757.

For some reason, the change introduced in #1362 to address #1361 was removed in #1537. Was it intentional or a mistake?