Trouble with Downloading and Opening a Zip File from API Response

I found a solution using the utils.downloadFile function that might be useful for others:
The first argument for utils.downloadFile can directly receive an object with the base64 encoded binary data (base64Binary). So I modified my script to:

utils.downloadFile(
  { base64Binary: GenerateQrCodes.data.base64Data },
  GenerateQrCodes.data.fileName,
  GenerateQrCodes.data.type.split('/')[1],
);

This wasn't indicated in the documentation, and it might be beneficial to add this detail to help others who are looking to handle binary data directly.

Anyway, thanks for your time and your solution! :slightly_smiling_face:

1 Like