I am currently having an issue creating a valid .zip file in SuiteScript 2.0.
Currently i am using the file module to create a file:
var zipFile = file.create({ // create zip file from 3 loaded files above
name: 'bsb_zipped_files.zip',
fileType: file.Type.ZIP,
contents: file1 + file2 + file3, // loaded files to place into archive
isOnline: true
});
zipFile.folder = 32112;
var zipFileId = zipFile.save();
And this works, to a degree, it creates a .zip file in the correct location but it's not a valid zip file and i can't extract the contents. I have seen several posts to say there is no API fro creating zip files but i'm sure there must be as otherwise ZIP wouldn't be a valid enum for the file.create function.