mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
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:
parent
914f7461dc
commit
9d7c288d86
1 changed files with 1 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue