Zipping and Unzipping Files Using Salesforce B2C Commerce Script

If you have large files, we recommend that you zip them for file transfer. You can automate the zip process if you are using a pipeline to transfer files by creating scripts.

The B2C Commerce API supports the creation and extraction of .zip files.


var catalog: File = new File('/catalog');'/temp/');
var catalogZip : File = new File('/temp/');
catalogZip.unzip('/temp/catalog'); // /temp/catalog created to store unzipped contents.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.