Filestack has long been enabling developers to allow end users to directly upload multiple files from multiple cloud sources like Dropbox, Facebook, and Google Drive in a seamless experience.
The ability to save solitary files back to cloud sources or a user’s computer is a little known Filestack feature. Today we are proud to announce new functionality that will extend these capabilities.
For some time, Filestack has enabled users to save single files to desktop and cloud drives using the Export API, but today we are proud to announce a new feature:
Export to Zip
The Zip File Export feature is particularly exciting for two reasons:
- You can now compress large files into a zip file for super fast exports. Data transfer to the user starts immediately, as soon as the compression process starts. This means no timeouts, and your users never have to wait for the download to start.
- You can now bundle multiple files into one zip file, so if you are working with applications that traffic in multiple files per individual user (such as a resume, photograph, work sample, etc.), you can now export an entire user’s file library in one easy step by consolidating them into one zip archive that is easy to manage.
Try it for yourself!
The way the zip export works is simple. Similar to Filestack’s usual file transformations, the developer can simply run a “zip” conversion for a file handle or bundle of file handles in an array in order to generate a zip file.
Zip a Filestack Handle
The basic structure to compress multiple files using Filestack handles is below :
https://process.filestackapi.com/zip/[image 1 handle,image 2 handle,image 3 handle]
For example, to make a zip file that contains the following images:
- Image 1: https://cdn.filestackcontent.com/u330JpHeShS8eK1wdYV0
- Image 2: https://cdn.filestackcontent.com/XyiMHLohQnz7HJbLNkvn
- Image 3: https://cdn.filestackcontent.com/jnDfD8f7Tpq0BqCGwvS4
When you make a call to:
curl -g https://process.filestackapi.com/zip/[u330JpHeShS8eK1wdYV0,XyiMHLohQnz7HJbLNkvn,jnDfD8f7Tpq0BqCGwvS4]-X GET > file.zip
You are returned a compressed file that includes all files from the files array. Click below to see:
Or Use External Image URIs
You can compress multiple files from external sources using a similar structure, the difference is that you must specify your API key in the processing URI. For example:
curl - g https://process.filestackapi.com/AhTgLagciQByzXpFGRI0Az/zip/[https://www.wikipedia.org/portal/wikipedia.org/assets/img/Wikipediafirstname.lastname@example.org,https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png] -X GET > file.zip
And you are returned the compressed file.
Click below to see:
Pretty sweet, right? Here at Filestack, we’re proud to deliver new ways to help you handle your files, from upload to export. Let us know how we can help at email@example.com.
Filestack is the #1 developer service for file uploads in the exploding realm of user-created content. Like Super APIs from other parts of the technology stack, such as Stripe and Twilio, Filestack allows software developers, for the first time, to integrate more than 25 of the world’s leading cloud drives with just a few lines of code. End users can upload content from cloud drives like Facebook, Instagram, and Dropbox or wherever that content is stored. In addition, Filestack enables developers to upload and store large files, transform and manipulate images and other file types, and deliver that content with blazing speed, responsively, across any type of desktop or mobile device. Filestack is headquartered in San Antonio, Texas and has been used by more than 50,000 app developers around the world.