JS Zip File Generator

Demo to preview the settings

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.
Image without caption

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”

Image without caption

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.
Image without caption
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.
Image without caption

Changelogs