Bundle an array of files into a zip file

You can generate zip files using Filestack's new transformation engine.

Note: The maximum accepted image size is 100,000,000 pixels. An image with this many pixels could have width and height combinations like 10,000 x 10,000 or 5,000 x 20,000, etc. There is also a file size restriction. Filestack will not convert an image that is larger than 256mb. Please contact us if you require the ability to process larger files than our current limits.

Zip

Zip Task URL Format:
https://process.filestackapi.com/zip/[Array_of_Filestack_Handles and URLS]
or
https://process.filestackapi.com/<API_KEY>/zip/[Array_of_Filestack_Handles and URLS]
zip
String

Root task cannot be abbreviated

This task takes the file or files that are passed into it and compresses them into a zip file. You can pass in a solitary filestack handle, a single external url, or an array of handles and urls to be zipped. The zip task has no additional parameters. It is simply called like this: zip.

Zip Examples

Original Image

This is the main image we will be zipping for the first example.

image to be used in Filestack collage examples

photo courtesy of Andrew Mione

Zip one file using a Filestack handle or external url

Transform and then Zip one file using a Filestack handle

Transform and Zip a file using an External URL:

Note: Transformations will only be applied to the first object in the files array, and the other files will not be added to the zip archive.

Add multiple files to a zip archive

Note: If you are trying to zip multiple external urls and do not include a filestack handle as the first file in the files array, then you will need to provide your API key in the standard fashion.

Use a POST request to Store the generated zip archive with custom storage parameters:

Zip and then Store file using CURL Request with External URL
>>> curl -X POST -g "https://process.filestackapi.com/AuSv4FudVRheqTxmY0NDgz/zip/store=container:filestack-web-demo,location:S3,region:us-east-1,path:\"my/custom/path/\",filename:my_zip_file.zip/[https://d1wtqaffaaj63z.cloudfront.net/images/20150617_143146.jpg,lJPl3UZAT4KBHshDh0rx,ESQaWCPlTBO8PIf3FcAj,cAOjqIyFS4W9aZwNfmNi,94YtbpTSQVuSVwwaSswR,MztUB2xSuucl8EKbRWgE]"
        

The response you receive will be like the standard JSON blob Filestack returns after using the filepicker.store() method.

returned JSON blob:

{"container":"filestack-web-demo","filename":"my_zip_file.zip","key":"my/custom/path/3BJL1a1dTHyR0oql6qJI_my_zip_file.zip","size":1.5683739e+07,"type":"application/x-zip-compressed","url":"https://cdn.filestackcontent.com/aP2uzPxUQpCe7HTxsh3I"}