upload: Provide the frontend with the less-modified filename.

This commit is contained in:
Alex Vandiver
2024-08-30 02:13:01 +00:00
committed by Tim Abbott
parent b4764f49df
commit 903bfb31e6
15 changed files with 51 additions and 39 deletions

View File

@@ -352,7 +352,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", "text/plain", b"zulip!", user_profile)
url = upload_message_attachment("dummy.txt", "text/plain", b"zulip!", user_profile)[0]
attachment_id = url.replace("/user_uploads/", "").split("/")[0]
return {"attachment_id": attachment_id}