fix(matrix): add filesize to nio.upload() for Synapse compatibility
Cherry-picked from PR #4343 by pjay-io. Synapse rejects chunked uploads without Content-Length. Adding filesize=len(data) ensures the upload includes proper sizing.
This commit is contained in:
@@ -604,6 +604,7 @@ class MatrixAdapter(BasePlatformAdapter):
|
||||
io.BytesIO(data),
|
||||
content_type=content_type,
|
||||
filename=filename,
|
||||
filesize=len(data),
|
||||
)
|
||||
if not isinstance(resp, nio.UploadResponse):
|
||||
err = getattr(resp, "message", str(resp))
|
||||
|
||||
Reference in New Issue
Block a user