The download
method initiates the download of a file using the provided blob URL.
try {
const url = 'file_url_here'; // The blob URL of the file to download.
const name = 'downloaded_file'; // Specify the desired file name.
const [data, error] = await sdk.file.download({
url,
name
});
// Check for success
if (error) {
console.error('Failed to initiate the download:', error);
} else {
console.log('Download initiated successfully:', data);
}
} catch (error) {
console.error('An unexpected error occurred:', error.message);
}
Params
url
(string): The blob URL of the file to download. You can get the blob URL using this method: https://delta-storage.readme.io/reference/get-urlname
(string): Specify the desired file name for the downloaded file.
Required API Key Permission
Read File