Team, I am trying to unzip a file, but I am gettin...
# suitescript
a
Team, I am trying to unzip a file, but I am getting this error: COMPRESS_API_DECOMPRESS_ERROR: Failed to decompress file: 'User Documents/test2.zip'. The file is a simple zip file, here is the code I am testing:
Copy code
function unzipFile() {
    let zippedFile = file.load({id: 1911442});
    let unzippedFile = compress.gunzip({file:zippedFile});
    return unzippedFile.getContents();
}
Anyone has succeeded doing this? Thanks!!!
b
go through the docs for compress.gunzip to learn which file type it supports
👍 1