Introduction

To facilitate integration by reading a flat file from the local file system and copying it into Joget for further processing.

Plugin Info

Plugins Available in the Bundle:

  1. Copy File Tool


This plugin bundle is compatible with Joget DX 8 and onwards.

Expected Outcome

The local system file is copied into Joget and the file can be downloaded.

Figure 1: File is copied into an upload file field

Get Started

Steps

Where to get the plugin

Refer to the Source Code and Plugin Download.

How to install and use the plugin

1. You can choose to import the demo app or create the app from scratch. For demo app, go to Joget Home or All Apps and click on Import App to import the downloaded demo app (refer to another KB - Import Joget App for more details).

2. To create the app from scratch, now let us create a new form Action Form with two fields, one with the name value field and the file path value field. This form is to enter an existing local system file path.

Figure 2: Action Form


3. Go to Settings > Advanced > Post Processing Tool > Copy File Tool. Next, configure the tool, for more details on configuration refer to Configure Copy File Tool.

Figure 3: Configure File Copy Tool


4. Create another form Target Form consisting of a file upload field, name, and address field. The copied file will be stored in the file upload field.

Figure 4: Main Form (Check Box)


4. On the top right corner, click on generate app and generate CRUD for both form.

Figure 5: Main Form (Generate CRUD)

Steps to run the plugin

1. In runtime, go to Manage Action Form and click New. Fill in the path file and the targeted file to copy.

Figure 6: Manage Action Form


2. In Manage Target you can see the copied file. 

Figure 7: Manage Target Form


3. Click on Edit, the copied file can be downloaded from the file upload field.

Figure 8: Manage Target Form - Edit Mode

Copy File Tool Properties

Configure Copy File Tool

Figure 9: Plugin Configurations for Copy File Tool

Name

Description

Copy File Tool Settings

Header Field.

File Path Option

Two Options:

  1. Enter File Path
  2. Form Field
Enter File Path
NameDescription
File Path

Field to set the File Path of the file from the local system.


File Path

Using Enter File Path will only focus on the file path entered in the configuration, which will ignore other file paths entered in the main form.


Form Field
NameDescription
Form

The form where the file path is set.

Path Field

The form field value of the file path.

Form To Store File

Header Field.

Form

Form to store the file path.

File Field

Form Field to store the file path.

Source Code and Plugin Download

  1. You can find the latest release at https://github.com/jogetoss/copy-file-tool.
  2. Upload the plugin to your Joget by navigating to Settings > Manage Plugins > Upload Plugin as admin.

Demo App Download



  • No labels