mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
upload: Stop requiring callers pass in the file size.
This can be calculated because we have the contents.
This commit is contained in:
committed by
Tim Abbott
parent
58a9fe9af1
commit
f52a93bc14
@@ -350,9 +350,7 @@ def deactivate_own_user() -> Dict[str, object]:
|
||||
@openapi_param_value_generator(["/attachments/{attachment_id}:delete"])
|
||||
def remove_attachment() -> Dict[str, object]:
|
||||
user_profile = helpers.example_user("iago")
|
||||
url = upload_message_attachment(
|
||||
"dummy.txt", len(b"zulip!"), "text/plain", b"zulip!", user_profile
|
||||
)
|
||||
url = upload_message_attachment("dummy.txt", "text/plain", b"zulip!", user_profile)
|
||||
attachment_id = url.replace("/user_uploads/", "").split("/")[0]
|
||||
|
||||
return {"attachment_id": attachment_id}
|
||||
|
||||
Reference in New Issue
Block a user