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
Shawn Talbert
04/12/2022, 4:46 PM
If you're uploading 'windows' zip, that's not quite the same as 'gzip'
s
Sam
04/12/2022, 5:56 PM
Not windows per se but definitely a ZIP archive with the .zip extension and not .gzip
Sam
04/12/2022, 5:56 PM
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
battk
04/12/2022, 8:04 PM
best option is to unzip in the browser using something like jszip
battk
04/12/2022, 8:05 PM
it is possible to run it in the suitelet itself, but it requires you to polyfill setTimeout
battk
04/12/2022, 8:05 PM
or to use an older version that still has synchronous support
battk
04/12/2022, 8:05 PM
either way you would want to performance test first, suitescript performance for binary operations is pretty bad