Generate Zip File Process Tool

Introduction

The Generate Zip File Process Tool plugin allows you to zip all files from a file upload form field in Joget. You also have the option to password-protect the generated zip file.

Note:
If you do not have a zip extractor, you can download one from 7-Zip.

Plugin information

  • Plugin Name: Generate Zip File Process Tool
  • Compatibility: Joget DX 8 and onwards

Get started

Where to get the plugin

You can download the Generate Zip File Process Tool Plugin from GitHub.

How to install

  1. Download the plugin from the GitHub repository.
  2. Log in as an admin and navigate to Settings > Manage Plugins.
  3. Click Upload Plugin, select the plugin file, and install it.

How to use it

  1. Create a form, drag a single text field, and file upload form element into it. Configure each form element as shown below:
     
    • Text Field: item_name
    • File Upload: file_upload
    • Zip Upload: zip_file_upload
  2. Check the Enable Multiple Files Upload option for the File Upload form element. This will allow multiple files to be uploaded.
  3. Once completed, generate a CRUD using the Generate App option.
  4. Go to Settings > Advanced.
  5. Scroll to the Post Form Submission Processing section and select Generate Zip Tool.
  6. Change the Run Tool on from Data Creation to Both Data Creation and Update. This configuration will run the plugin upon new record creation or update. 
  7. Configure the Generate Zip Tool Plugin:
    • From:

      • Select the form created in Step 1 to obtain the files.
      • Insert the File Upload form element ID (file_upload).
      • Use the record ID hash variable #form.generated_zip_sample.id# to specify the record ID.
    • To:

      • Select Form to Store Zip: Select the form created in Step 1 to store the generated zip.
      • Target Form Field ID to Store Zip File: Insert the Zip Upload form element ID (zip_file_upload).
      • Target Record ID: Use the record ID hash variable #form.generated_zip_sample.id# to store the generated zip.
      • Zip File Name: Configure a dynamic name for the zip file, e.g., Zip File #data.mm ss a#.
      • Zip Password(optional): Insert any password, such as "test," to protect the zip file.
  8. Once finished, save the changes.
  9. Test the app upon new record creation or record update. The plugin will generate a Zip File in the configured File Upload form element as shown below:
    • No password zip generation
    • Password-protected zip generation

Configure generate zip plugin properties

From

Fields to configure:

  • Select Form to Obtain File: Select the form where the files are stored.
  • Form Field ID of the File: Enter the ID of the file upload form element.
    The form field must be a File Upload element. Otherwise, it wouldn't work.
  • Record ID: Enter the record ID that stores the files.
To

Fields to configure:

  • Select Form to Store Zip: Choose the form where the zip file will be stored.
  • Target Form Field ID to Store Zip File: Enter the form upload field ID where the generated zip file will be stored.
  • Target Record ID: Enter the record ID to store the zip file.
  • Zip File Name: Specify a name for the generated zip file.
  • Zip Password (optional): Insert a password.
    Inputting a password to this field will enable the plugin to generate a password-protect zip.

Expected outcome

After configuring the Generate Zip File Process Tool, all files uploaded in the form are compressed into a zip file, with an option to password-protect the file.

  • No Password Zip Generation
  • Password-Protected Zip Generation

Download plugin

You can download the Generate Zip File Process Tool Plugin from the GitHub repository.

Download sample app

Download the demo app for Generate Zip File Process Tool:
Created by Julieth Last modified by Aadrian on Nov 19, 2024