Download All Attachments As Zip

1 Likes

DownloadHelperThis SBM Composer Form Extension adds a button to your form, enabling users to download all file attachments as a single ZIP file.

Download as Zip Helper 

Draft proof of concept. 
Loads libraries via CDN on the fly, thus your client needs an internet connection. The "attachment section" of your item must be placed on the form (it can be hidden), otherwise the Form Extension will not pick up any attachments. Files are downloaded into the local browser store, then zipped in memory and offered as a download. This methods has constrains regarding file size depending on the browser (end version) you are using.

Parameters
Name:    This is the text for the download button
Filename: This is the name of the zip file. You need to append ".zip" to it and make sure you are not using invalid file name characters

Todos/ Ideas:
- Allow to choose a file filter, i.e. only download image attachments
- Optionally add a text file with item metadata and a file list to the zip
- Automatically hide the download button unless there are attachments to download
- Pull attachments via JsonPage, this makes it unnecessary to have the attachment section on the form
- Allow to pull Notes into the zip
- Fix: Multiple Attachments with the same name

Test Set:
- SBM 11.0
  - IE 11
  - Chrome 48
  - Firefox 43

Labels:

Extension
Comment List
Parents Comment Children
No Data
Related
Recommended