Adobe Campaign JavaScript SDK

Downloading files

Files can be downloaded using the client.fileUploader.download method. In order to download a file from the Campaign server, you need the file md5 and extension which act as the file key. For example, the md5 of a file attachment in a delivry is available in the attachment/@md5 attribute.

In the following example, a CSV file is downloaded

    const responseFile = await client.fileUploader.download("d83d8b9a7504043644e1f2dd0a28bf7f", "csv", {
        fileName: 'My Sample File.csv',
        contentType: "txt/csv",
    });

The function returns a File Blob

This function only works when using the SDK in the browser.