VFZip : Create ZIP files inside Force.com

Well this is very early release, was a bit excited when I found that it actually works! and I couldn't wait to till completion of app. So I just created a bare minimum version of this component to Post the same.

Well talking about the component it is pretty simple and uses  JSZip (can be found here) to create zip files inside a Visualforce page. I will be posting the  details about how VFZip actually works in subsequent blogs.
For now I am just posting a small unmanaged package that can create Zip files, I will be working on this further to expand the same.

Features of VFZip
  • Can zip multiple files.
  • You can provide your own name for the generated zip files.
  • Can zip upto 5mb(I know its kinda discouraging but I guess I can take it further around 15mb)

How to use ?
The syntax is pretty simple 


<c:VFZip attachmentIds="00P90000004wnj8" generatedFileName="myzip" mode="button"/>  

[Please make sure you replace the id with one from your org]

Parameters
  • attachmentIds : Comma separated IDs of attachment to zip
  • generatedFileName : File name of the generated zip.
  • mode : Defines the launch mode. If set to "button" the component will display a button to launch the zip window. If set to "auto" the component will launch the zip window as soon as Visualforce page is opened.
Screens




2 comments: