Skip to main content

Downloading Files

The code example below shows how to download a file from a Store in PrivMX:

const file = await Endpoint.connection().stores.getFileMetadata('FILE_ID');
const fileName = deserializeObject(file.publicMeta).name;

await Endpoint.connection().stores.downloadFile({
fileId: 'FILE_ID',
fileName,
progressCallback: progress => {
console.log(`Download progres ${progress}`);
}
});