2

I am working with file-picker. from front-end side user is filling a form and uploading files in it, which are stored using file-picker. on submit of users form I have to send him acknowledgement email with his files as an attachment. files need to be send as attachment and not as file-picker url in body. I am using node js. Can anyone help me out?

Robert
  • 5,278
  • 43
  • 65
  • 115

1 Answers1

0

Filepicker does have a functionality like this, https://www.filepicker.com/documentation/file_ingestion/javascript_api/export?v=v1, when using export choose Send As Email option to send it as attachment.

Example code:

filepicker.exportFile(
    'https://www.filepicker.io/api/file/0lYRK93XSHKnKaQ6elRT',
    {
    mimetype:'image/jpeg',
    suggestedFilename: 'newFile'
    },
    function(Blob){
    console.log(Blob.url);
    }
);
Konrad Wąsowicz
  • 422
  • 2
  • 6
  • 12