IPFS File Upload Form Element

Introduction

The IPFS File Upload Form Element Plugin allows you to upload files to the InterPlanetary File System (IPFS) through the Joget DX8 platform. This plugin extends the default File Upload form element by integrating with Blockfrost to manage file uploads to IPFS nodes. It handles file pinning when new files are uploaded and ensures files are unpinned when replaced or deleted, offering decentralized file storage with additional capabilities.

Plugin information

This plugin is based on the default bundled File Upload form element.

Key functionalities include:

  • When a new file is uploaded, it is also uploaded to IPFS and pinned to the IPFS node.
  • When a file replaces an existing file, if the file content differs, the old file is unpinned, and the new file is uploaded to IPFS and pinned on the IPFS node.
  • When the file is removed, or a related form record is deleted, the file is unpinned on the IPFS node.

The source code for this plugin is available on the JogetOSS GitHub. You can clone and customize it according to your needs.

Known Limitations
The Enable Multiple Files Upload property is unavailable due to IPFS handling constraints.
For automatic file unpinning upon form record deletion, you must enable the Delete Associated Child Form Data? property in list-type userview menus or delete actions, such as CRUD menu or Datalist delete actions.

Get started

Where to get the plugin

You can download the plugin from the JogetOSS GitHub releases page.

How to install

  1. Obtain the plugin's .jar file from the provided link.
  2. In your Joget DX8 environment, go to System Settings > Manage Plugins > Upload Plugin.
  3. Select the downloaded .jar file, and click Upload to install the plugin.

How to use it

  1. Open the Form Builder in Joget DX8.
  2. Locate the IPFS File Upload Form Element in the Form Element Palette under the Marketplace section.
  3. Drag and drop it into your form.
  4. Paste your generated IPFS project API key. You can obtain this key by signing up for a Blockfrost account.
  5. Specify the field that will store the file's IPFS content identifier. This will update when a file is uploaded.

For more information on Blockfrost project key types, see the Blockfrost Documentation.

Configure IPFS File Upload Properties

To configure this plugin, see the Joget DX 8 Knowledge page for the File Upload form element. This plugin's configuration is almost identical except for the additional configurable properties below.

IPFS Configuration
  • Blockfrost IPFS Project Key: Paste your generated IPFS project API key.
  • Field ID to Store Content ID: This field will store the file's IPFS content identifier, which will change depending on the file uploaded to this form element.
Example value: QmeRdF1aybs9VKMYKM8E5tFPW96ngJ8i76Lia763wVtNX6

Download plugin

Created by Julieth Last modified by Aadrian on Nov 19, 2024