dialogflow-fulfillment-nodejs icon indicating copy to clipboard operation
dialogflow-fulfillment-nodejs copied to clipboard

Send pdf file as url link or button from agent

Open atsoares opened this issue 5 years ago • 0 comments

Hi, I would like to know if is possible to attach a file or call an intent that calls to something like this:

function downloadPDF(pdf) {
    const linkSource = `data:application/pdf;base64,${pdf}`;
    const downloadLink = document.createElement("a");
    const fileName = "vct_illustration.pdf";

    downloadLink.href = linkSource;
    downloadLink.download = fileName;
    downloadLink.click();
}

The documentation is lacking for custom payload. The only example is audio file.

atsoares avatar Oct 28 '19 12:10 atsoares