瀏覽代碼

if as_attachment is in the url, add it to the sign_url (#18930)

tags/1.3.1
sondin 6 月之前
父節點
當前提交
edcfd7761b
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      api/models/model.py

+ 3
- 1
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

Loading…
取消
儲存