From edcfd7761b6da1b92c05b148db8296f08f6b25bb Mon Sep 17 00:00:00 2001 From: sondin <108917452+sondin@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:25:59 +0800 Subject: [PATCH] if as_attachment is in the url, add it to the sign_url (#18930) --- api/models/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/models/model.py b/api/models/model.py index d1490d75c8..901e92284a 100644 --- a/api/models/model.py +++ b/api/models/model.py @@ -1012,7 +1012,9 @@ class Message(db.Model): # type: ignore[name-defined] sign_url = file_helpers.get_signed_file_url(upload_file_id) else: continue - + # if as_attachment is in the url, add it to the sign_url. + if "as_attachment" in url: + sign_url += "&as_attachment=true" re_sign_file_url_answer = re_sign_file_url_answer.replace(url, sign_url) return re_sign_file_url_answer