✅ Link to the plugin page: https://zeroqode.com/plugin/js-zip-file-generator-plugin-for-bubble-1728517391848x965911820325646700
Demo to preview the plugin:
Live Demo: https://js-zip-demo.bubbleapps.io/
Introduction
This plugin allows you to create a ZIP file from a list of URLs on the client side, without using any server resources or Workflow Units. It efficiently downloads files from specified URLs, compresses them into a single ZIP archive, and offers options to automatically download the file or save it to Bubble. Additionally, it provides real-time progress updates and handles errors for missing or inaccessible files.
How to setup
- Install the plugin
- Set the plugin element on your page “JSZip”
Files used should not have any privacy rules, as otherwise the plugin cannot access them.
Plugin Element “JSZip”
Element Action
Generate Zip file (Client)
This action generates a base64 encoded zip file of the JSZip instance from specified URLs, compresses them into a ZIP archive, and optionally triggers an automatic download or uploads the archive to the Bubble app. The process also provides feedback on download progression and error handling if any file fails to load.
Title | Description | Type |
File URL List | A list of URLs pointing to the files you want to download and include in the ZIP archive. | Text List |
File Name List | A list of custom names for each file in the ZIP archive, corresponding to each URL in “File URL List”.
The plugin will only include files with a unique name. You can easily make the name unique by using the 'calculate formula' expression [b]before[/b] the file name.
A '/' in the file name list will create a new folder in your ZIP file. For example: "my_folder/file_1" | Text List |
Decode URL | Decodes URL-encoded characters in each URL, allowing filenames with special characters to be processed correctly.
If you have some issue to zip files because of special url encoding, disable this. Filename may contain encoding if deactivated. | Checkbox |
Increment File Name | Appends a unique number to each file name in the ZIP archive. This is useful to avoid conflicts when multiple files have the same name. | Checkbox |
Zip File Name | The name for the ZIP file, without the ".zip" extension. The extension will be added automatically during file creation. | Text |
Automatic Download | Automatically initiates a download of the ZIP archive after it’s created. | Checkbox |
Compression | Store = No compression. Deflate will use Compression level. | Dropdown ( STORE,DEFLATE ) |
Compression Level | Compression level if compression is set to DEFLATE. | Dropdown (
1,2,3,4,5,6,7,8,9
) |
Save File to Bubble | This will trigger event "Zip file is uploaded to Bubble" and stores the zip into the Zip file state element so you can save it to Bubble. Don't foget Bubble limitation for file size. The file for Bubble is bigger than the one generated for automatic download. Using DEFLATE with a high compression level will reduce this a lot. | Checkbox |
Exposed states
Name | Description | Type |
Current file | The name of the file currently being added to the ZIP archive. This state updates dynamically as each file from the list “File URL List” is processed. | Text |
Progression | The percentage of the ZIP creation process that has been completed. This state updates continuously as each file is successfully added to the archive. | Number |
Zip file | The URL of the finished ZIP file after it is uploaded to Bubble storage, if the “Save File to Bubble” property is enabled. This URL allows users to download or access the ZIP file after it has been successfully saved. | File |
Last Error | An error message providing details about any issues encountered during the ZIP file creation process, particularly if a file URL is inaccessible or cannot be downloaded. | Text |
Bubble Upload Progress | The upload progress percentage when saving the ZIP file to Bubble's storage, updating continuously until the upload is complete. | Number |
Element Events
Name | Description |
Zip file is uploaded to Bubble | This event is triggered once the generated ZIP file has been successfully uploaded to Bubble's storage, making the file accessible via a public or restricted URL. |
Zip file is created | This event is triggered immediately after the ZIP file is successfully created in memory and is ready for download or further processing. |
Changelogs
Update 10.10.24 - Version 2.8.0
- Acquired by Zeroqode.
Update 29.09.24 - Version 2.7.2
- Documentation improvements.
Update 04.08.24 - Version 2.7.1
- Improvements.
Update 10.11.23 - Version 2.7.0
- Replaced a deprecated JS file.
Update 31.07.23 - Version 2.6.1
- Documentation updates.
Update 06.07.23 - Version 2.6.0
- Improvements.
Update 27.06.23 - Version 2.5.2
- Improvements.
Update 17.01.22 - Version 2.5.1
- Added "Decode url" settings. You can avoid plugin to decode url automatically..
Update 25.05.21 - Version 2.5.0
- Added support for large file.
Update 08.05.20 - Version 2.4.1
- Reset progression to 0.
Update 07.05.20 - Version 2.4.0
- Added Event for Zip Created.
Update 06.05.20 - Version 2.3.0
- Upload Large file (Bubble Update).
Update 10.04.20 - Version 2.2.0
- Add folders handling.
Update 19.01.20 - Version 2.1.2
- DO NOT USE.
Update 04.01.20 - Version 2.1.1
- Fix.
Update 04.01.20 - Version 2.1.0
- Testing file URL to avoid issue with deleted files url.
Update 10.12.19 - Version 2.0.3
- Personnal AWS S3 Storage issue with file encoding fixed.
Update 23.07.19 - Version 2.0.2
- Bug Fixing.
Update 22.07.19 - Version 2.0.1
- Fix for empty filename.
Update 09.07.19 - Version 2.0.0
- NAme change, Release.
Update 09.07.19 - Version 1.1.1
- Release.
Update 24.06.19 - Version 1.1.0
- Fix filename in Firefox and Edge.
Update 23.06.19 - Version 1.0.1
- Breaking change: You need to set filename now. .
Update 23.06.19 - Version 1.0.0
- 0.2.
Update 21.06.19 - Version 0.1.1
- 0.1.1 BETA - TESTING PLEASE DO NOT UPDATE TO THIS VERSION.
Update 18.06.19 - Version 0.1.0
- 0.02 BETA - Add option for custom file name.
Update 27.05.19 - Version 0.0.1
- 0.01 First BETA version.