Hi All - Has anyone ever used `JSZip` (or any oth...
# suitescript
m
Hi All - Has anyone ever used
JSZip
(or any other JS library) for uzipping a file in SuiteScript? I'm fetching a file from an SFTP server in a custom plugin script (so far, so good), however, I'm unable to unzip it. I tried following the guidelines published by JSZip, also tried implementing some sample code from other sources (not SuiteScript related though) - no dice. When using the generic method for unzipping, I'm getting an error message saying that the library file itself has some undefined variables (such as:
ReferenceError: "setTimeout" is not defined.
) -- I even tried using older versions of the library -- Nada! : ) Thanks!
b
setTimeout is one of the javascript globals that is usually found in the javascript runtime
common enough that its usually assumed to be present
if you are desperate, you can badly fake it by implementing it on the global context, but its something you cant really fake