N/compress Am I only able to unzip files I have c...
# suitescript
s
N/compress Am I only able to unzip files I have compressed with compress.gzip? I am uploading a .zip file containing many XML files to a Suitelet, then via the POST method I am attempting to unzip that file but I am getting COMPRESS_API_DECOMPRESS_ERROR
s
If you're uploading 'windows' zip, that's not quite the same as 'gzip'
s
Not windows per se but definitely a ZIP archive with the .zip extension and not .gzip
I don’t really want to have to ask the user to have to decompress, recompress and .gzip and upload to the Suitelet, is there any libraries available I can import?
b
best option is to unzip in the browser using something like jszip
it is possible to run it in the suitelet itself, but it requires you to polyfill setTimeout
or to use an older version that still has synchronous support
either way you would want to performance test first, suitescript performance for binary operations is pretty bad