[英]button to download an attachment in the email
I add a pdf as an attachment to my email, what I want to do is create a button in the body of my email to download this attachment, is that possible?我将 pdf 作为附件添加到我的电子邮件中,我想要做的是在我的电子邮件正文中创建一个按钮来下载此附件,这可能吗? How could I solve it?
我怎么能解决呢?
MAILER:邮递员:
attachments.inline["file.pdf"] = file.pdf
HTML: HTML:
<a href="<%= attachments['file.pdf'].url %>" class="btn-download-pdf" download>Download PDF</a>
This doesn't work for me, is there any way I can solve this?这对我不起作用,有什么办法可以解决这个问题吗?
要启用该功能,请按如下方式将链接附加到 pdf 文件<a href="[SITE_URL]/file.pdf" class="btn-download-pdf" download>Download PDF</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.