Use kwargs when calling nio.AsyncClient.upload()
This commit is contained in:
parent
921f75827d
commit
bbd845c040
1
TODO.md
1
TODO.md
|
@ -1,6 +1,5 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- uplaod/download use kwargs
|
|
||||||
- highlight messages being responded to
|
- highlight messages being responded to
|
||||||
- highlight messages with mention
|
- highlight messages with mention
|
||||||
- add room members loading indicator
|
- add room members loading indicator
|
||||||
|
|
|
@ -1115,12 +1115,12 @@ class MatrixClient(nio.AsyncClient):
|
||||||
mime = mime or await utils.guess_mime(data_provider(0, 0))
|
mime = mime or await utils.guess_mime(data_provider(0, 0))
|
||||||
|
|
||||||
response, decryption_dict = await super().upload(
|
response, decryption_dict = await super().upload(
|
||||||
data_provider,
|
data_provider = data_provider,
|
||||||
"application/octet-stream" if encrypt else mime,
|
content_type = "application/octet-stream" if encrypt else mime,
|
||||||
filename,
|
filename = filename,
|
||||||
encrypt,
|
encrypt = encrypt,
|
||||||
monitor,
|
monitor = monitor,
|
||||||
filesize,
|
filesize = filesize,
|
||||||
)
|
)
|
||||||
|
|
||||||
return UploadReturn(response.content_uri, mime, decryption_dict)
|
return UploadReturn(response.content_uri, mime, decryption_dict)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user