Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
Generate Zip File Process Tool plugin allows users to zip all files residing in a file upload form field of the selected form. The plugin also offers the option to password-protect the generated zip file.
You can check the source code: https://github.com/jogetoss/generate-zip-file
If you do not have a zip extractor, you can download from https://https://www.7-zip.org/download.htmlYou can download the plugin here: View file
...
In the following outputs, all the files in the file upload field are compiled into a zip file.
No password zip generation
...
Figure 2: Password-protected
The plugin has numerous use cases, this article will explain how to use the plugin by building an example app.
First, you can obtain the plugin jar file from the latest release at https://github.com/jogetoss/generate-zip-file/releases.
Upload the plugin jar file in Joget by going to Settings → Manage Plugins.
Create a form, drag a single text field, and file upload form element into it. Configure each form element as shown below:
...
Once completed, generate a CRUD through the "Generate App" option
Go to "settings" > "advanced", and scroll down to the "Post Form Submission Processing" section. In the Post Processing Tool field, select "Generate Zip Tool". 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.
Figure 5: Configure Post Form Submission Processing
Configure the Generate Zip Tool plugin
...
Once finished, save the changes.
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:
...
Figure 13: Password-protected
Figure 14: Plugin "From" properties
Field | Description | ||
---|---|---|---|
Select Form to obtain file | Select the form to obtain the desired files | ||
Form Field ID of the file | The form field ID of the file upload form element contains the files you wish to zip.
| ||
Record ID | The record ID that stored the files |
Figure 15: Plugin "To" properties
Field | Description | ||
---|---|---|---|
Select Form to Store Zip | Select the form to store the generated zip file | ||
Target Form Field ID to store Zip File | Form Upload field in the selected form to store the generated Zip File | ||
Target Record ID | The record ID to store the zip files | ||
Zip File Name | Generated zip file name | ||
Zip Password (optional) | Zip password
|
View file | ||||
---|---|---|---|---|
|