API Reference

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

Required API Key Permission

  • Read File