【问题标题】:how to email filepicker url files as an attachment?如何通过电子邮件将文件选择器 url 文件作为附件发送?
【发布时间】:2015-05-11 08:09:33
【问题描述】:

我正在使用文件选择器。从前端用户正在填写表单并在其中上传文件,这些文件使用文件选择器存储。在提交用户表单时,我必须向他发送确认电子邮件,并将他的文件作为附件。文件需要作为附件发送,而不是作为正文中的文件选择器 url。我正在使用节点 js。谁能帮帮我?

【问题讨论】:

  • 您是否使用 mandrill 或 sendgrid 之类的电子邮件服务来发送电子邮件?

标签: javascript node.js filepicker.io


【解决方案1】:

Filepicker 确实有类似https://www.filepicker.com/documentation/file_ingestion/javascript_api/export?v=v1 的功能,当使用export 时选择Send As Email 选项将其作为附件发送。

示例代码:

filepicker.exportFile(
    'https://www.filepicker.io/api/file/0lYRK93XSHKnKaQ6elRT',
    {
    mimetype:'image/jpeg',
    suggestedFilename: 'newFile'
    },
    function(Blob){
    console.log(Blob.url);
    }
);

【讨论】:

    猜你喜欢
    • 2021-07-18
    • 1970-01-01
    • 2011-09-10
    • 2013-07-26
    • 2020-05-07
    • 2011-09-23
    • 2015-08-03
    • 1970-01-01
    • 2013-03-19
    相关资源
    最近更新 更多