diff --git a/pghoard/transfer.py b/pghoard/transfer.py index 7ed73f8f..94d8f525 100644 --- a/pghoard/transfer.py +++ b/pghoard/transfer.py @@ -323,7 +323,7 @@ def handle_upload(self, site, key, file_to_transfer: UploadEvent): f = open(file_to_transfer.source_data, "rb") with f: metadata = file_to_transfer.metadata.copy() - if file_to_transfer.file_size: + if file_to_transfer.file_size is None: metadata["Content-Length"] = str(file_to_transfer.file_size) storage.store_file_object( key, f, metadata=metadata, upload_progress_fn=file_to_transfer.incremental_progress_callback