diff --git a/src/pretix/helpers/http.py b/src/pretix/helpers/http.py index fd32d8bd4f..d1471080a8 100644 --- a/src/pretix/helpers/http.py +++ b/src/pretix/helpers/http.py @@ -5,5 +5,7 @@ class ChunkBasedFileResponse(StreamingHttpResponse): block_size = 4096 def __init__(self, streaming_content=(), *args, **kwargs): + filelike = streaming_content streaming_content = streaming_content.chunks(self.block_size) super().__init__(streaming_content, *args, **kwargs) + self['Content-Length'] = filelike.size