mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-13 15:18:16 +08:00
if as_attachment is in the url, add it to the sign_url (#18930)
This commit is contained in:
parent
b8daf944f1
commit
edcfd7761b
@ -1012,7 +1012,9 @@ class Message(db.Model): # type: ignore[name-defined]
|
|||||||
sign_url = file_helpers.get_signed_file_url(upload_file_id)
|
sign_url = file_helpers.get_signed_file_url(upload_file_id)
|
||||||
else:
|
else:
|
||||||
continue
|
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)
|
re_sign_file_url_answer = re_sign_file_url_answer.replace(url, sign_url)
|
||||||
|
|
||||||
return re_sign_file_url_answer
|
return re_sign_file_url_answer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user