Font Size:
Ask Joget AI

Encrypted File Upload

Introduction

The Encrypted File Upload plugin extends the standard Joget File Upload element by providing automatic file encryption for uploaded files. Files are securely encrypted before being stored on the server and are automatically decrypted when downloaded through Joget, helping protect sensitive documents from unauthorized access.

Plugin Info

Plugins Available In The Bundle:

  • Encrypted File Upload Plugin
  • Encrypted File Datalist Formatter

This plugin bundle is compatible with Joget DX 9.

Note:
The Encrypted File Upload plugin supports all the features and configuration options available in the standard Joget File Upload element, with the addition of file encryption capabilities.

Get Started

Where To Get The Plugin

You can download this plugin from the latest Releases.

How To Install

  • Click Download on the plugin page (the downloaded file will be a .jar file).
  • In Joget, navigate to Admin Bar → System Settings → Manage Plugins.
  • Click Upload Plugin.
  • Select the downloaded plugin .jar file and click Upload.
  • The Encrypted File Upload element will now be available in the Form Builder.
  • If you are upgrading from an older version of the plugin, uninstall the previous version before uploading the new one.

How To Use It

  1. Open your form in Form Builder. Drag and drop the Encrypted File Upload element into your form.
  2. Configure the plugin properties:
    • Enter an Encryption Key, or
    • Specify a Joget Hash Variable that resolves to the encryption key.

3. (Optional) Enable Encrypt Existing Plain Files On Submit if you want previously uploaded unencrypted files to be encrypted the next time a record is saved.

4. Save the form and publish the application.

Note:
  • Files stored on the server are encrypted and cannot be opened directly from the upload directory.
  • Existing applications can migrate from the standard File Upload by replacing it with the Encrypted File Upload element using the same Form Field ID.
  • Existing files remain unencrypted unless Encrypt Existing Plain Files On Submit is enabled.
  • The plugin supports all features available in the standard Joget File Upload element.

Configure Encrypted File Upload Properties

Fields to Configure

  • Encryption Key / Hash Variable: Specify the encryption key used to encrypt uploaded files. You can either enter the encryption key directly or provide a Joget Hash Variable that resolves to the encryption key. The same key must be used when downloading encrypted files, such as through the Encrypted File Datalist Formatter.
  • Encrypt Existing Plain Files on Submit: Determines whether previously uploaded unencrypted files should be encrypted when an existing record is edited and saved.
    • Enabled: Existing unencrypted files are encrypted the next time the record is saved.
    • Disabled: Existing unencrypted files remain in their original unencrypted format. Only newly uploaded files are encrypted.

Expected Outcome

After implementing the Encrypted File Upload Plugin, the following behaviors can be expected:

1. New File Uploads Are Automatically Encrypted

When a user creates a new record and uploads a file using the Encrypted File Upload element, the file is encrypted before being stored on the server.

Example

A user uploads resume.pdf and saves the form.

  • The file stored in the upload directory is encrypted and cannot be opened directly from the server.
  • When the user downloads resume.pdf through Joget, the plugin automatically decrypts the file, allowing it to be opened normally.

2. Backward Compatibility with Existing File Upload

Applications can migrate from the standard File Upload element to the Encrypted File Upload element without affecting existing records. Simply replace the File Upload element with the Encrypted File Upload element using the same Form Field ID.

Example

An application already contains records with files uploaded using the standard File Upload element. After replacing the element with the Encrypted File Upload plugin:

  • Existing files remain accessible.
  • Users can continue downloading these files normally.
  • Existing files are not automatically encrypted.

3. Existing Plain Files Remain Unchanged by Default

By default, existing files uploaded before the plugin was introduced remain in their original unencrypted format, even if the record is edited and saved.

Example

An existing record contains contract.pdf, which was uploaded before the Encrypted File Upload plugin was implemented.

A user edits another field in the record and clicks Save.

  • contract.pdf remains unencrypted.
  • Only newly uploaded files are encrypted.

4. Existing Plain Files Can Be Encrypted During Migration

If Encrypt Existing Plain Files on Submit is enabled, any existing unencrypted files will be encrypted the next time the corresponding record is edited and saved.

Example

An existing record contains an unencrypted file named sample.pdf.

The administrator enables Encrypt Existing Plain Files on Submit.

When a user edits the record and clicks Save:

  • sample.pdf is encrypted before being stored.
  • The file can no longer be opened directly from the upload directory.
  • Downloading the file through Joget automatically decrypts it.

5. Multiple File Uploads

The plugin fully supports multiple file uploads.

Example

A user uploads three files:

  • resume.pdf
  • certificate.pdf
  • passport.pdf

After saving the record:

  • Each file is encrypted individually before being stored.
  • All files are automatically decrypted when downloaded through Joget.

How to Use Encrypted File Datalist Formatter

1. Open the Datalist for the form that contains the Encrypted File Upload field.

2. Select the column that corresponds to the Encrypted File Upload field.

3. Under Formatter, select Encrypted File Datalist Formatter.

4. Configure the formatter and Click Apply Changes.

Configure Encrypted File Datalist Formatter Properties

Fields to Configure

  • Form: Select the form that contains the Encrypted File Upload field. This allows the formatter to identify the correct form and generate secure download links for the encrypted files.
  • Encryption Key / Hash Variable: Specify the same encryption key or Joget Hash Variable used by the Encrypted File Upload element. The formatter passes this key to the download service so the file can be decrypted during download.
  • Download as Attachment: Determines how the downloaded file is handled by the browser.
    • Enabled: Forces the browser to download the file as an attachment.
    • Disabled: Opens supported file types (such as PDF or images) in a new browser tab. If the browser does not support inline viewing, the file will be downloaded instead. 

Note:
The Encryption Key / Hash Variable configured in the Encrypted File Datalist Formatter must match the key configured in the corresponding Encrypted File Upload element. If the keys do not match, the downloaded file cannot be decrypted correctly and may fail to open (for example, a PDF may display "Failed to load PDF document.").

Expected Outcome

After configuring the Encrypted File Datalist Formatter, encrypted files can be downloaded directly from the Datalist.

Example

  1. Upload sample.pdf using the Encrypted File Upload element.
  2. Configure the file upload column to use the Encrypted File Datalist Formatter.
  3. Open the Datalist.
  4. Click sample.pdf.

Expected Result

  • The file is automatically decrypted during download.
  • The downloaded file can be opened normally.
  • The file stored in the server's upload directory remains encrypted and cannot be opened directly.
Created by Nabila Jahan Last modified by Nabila Jahan on Jul 02, 2026