Hello,
Has anyone had experience of downloading a base64 encoded ZIP file. It sounds relatively straight forward however the file that is created cannot be opened (m/s invalid file format error appears). The size of the file is almost the same as the source file, therefore I assume somewhere the process is going wrong.
Instead of doing a split, you’ll want to decode the base64 strings with Base64.decodeAsBinary() to turn them into byte arrays. You can then combine them using the Uint8Array.concat() method (which is not documented at the moment, we’ll get that fixed). The concat() method will concatenate byte arrays and return a new byte array. The following expression puts it all together:
Note: the concat() is a method on an existing byte array, so the above expression first creates an empty byte array with Uint8Array.of() so that we can pass all of the byte arrays using the spread operator (...).