This is the code I use:
axios.get(fileUrl, {headers:{'X-API-TOKEN':xxxxxx})
Response data received is in binary, Which I am converting to base64 and saving in file. After saving zip file. If I try to open the file, it says invalid zip error.
This is the code I use:
axios.get(fileUrl, {headers:{'X-API-TOKEN':xxxxxx})
Response data received is in binary, Which I am converting to base64 and saving in file. After saving zip file. If I try to open the file, it says invalid zip error.
You can try adding responseType as arraybuffer
axios.get(
fileUrl,
{headers:{'X-API-TOKEN':xxxxx}, responseType: 'arraybuffer'}
);