Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Introduction

Mayan Electronic Document Management System (Mayan EDMS) is an open-source document management platform designed for organizations to efficiently store, organize, and manage digital documents. It offers features such as document versioning, workflow automation, and secure access control.

Mayan DMS File Upload plugin allows user to seamlessly upload and download documents to/from Mayan EDMS. There are three components of this plugin.

  • Mayan File Upload - Upload & Download
  • Mayan Option Binder - Allows user to populate the values of Document Types, Cabinets and Tags from Mayan EDMS.
  • Mayan File Formatter - Allow user to format the filename and download the file directly from the datalist.


This plugin is created with the use of REST API — Mayan EDMS Documentation to perform RESTful API calls on Mayan EDMS.

The plugin source code is available in JogetOSS.


Mayan Option Binder

Configure Mayan Option Binder

Image Added


Figure 1 : Mayan Option Binder Configuration


Name

Description

Options

Header field.

Option *

The type of dashboard that is shown to the user.

  • Cabinets

  • Document Types

  • Tags

Add Empty Option

Checkbox. If true, creates an empty option with label configured in next field.

Empty Option Label

Text field to determine label for empty option.

Example: "Please Select"

Credentials

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.



Mayan File Upload

Configure Mayan File Upload

More details on default configurations for file upload: File Upload - Knowledge Base for DX 8 - Joget | COMMUNITY

Below are configurations for section "Mayan EDMS Settings":

Image Added

Figure 2: Mayan EDMS Settings for Mayan File Upload Plugin

Name

Description

Credentials 

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.

Fields Mapping

Header field.

Form *

The current form to bind the fields with.

Document Type *

The selected form field that contains the Document Type value.

Cabinet 

The selected form field that contains the Cabinet value.

Tag

The selected form field that contains the Tag value.



Mayan File Formatter

Configure Mayan File Formatter

More details on default configurations for file upload: File Upload - Knowledge Base for DX 8 - Joget | COMMUNITY

Below are configurations for section "Configure Mayan EDMS SettingsFile Formatter":
List --> mayan_file_upload column --> formatter --> Mayan DMS File Formatter 

Image Added

Figure 3: Mayan EDMS File Formatter Configuration

Name

Description

Enable File Download

Checkbox field. If true, enables file download.

Credentials 

Header field.

Server URL *

The URL that Mayan EDMS is hosted at.

Example: http://localhost

Username *

Mayan EDMS username. 

Password *

Mayan EDMS password.



Setting up Mayan EDMS

Please refer to Installation — Mayan EDMS Documentation to download and install the desired version for your system. 


For this example, OpenKM is run on Docker with Linux using Docker Compose.


When you see the following page http://localhost/authentication/login/, it shows that your Mayan EDMS has been successfully hosted. Login with the automatic credentials shown in the page. 

Figure 14: Mayan EDMS Login Page


After logging in, you will see the homepage of Mayan EDMS.

Figure 25: Mayan EDMS Homepage


Configuring the Mayan EDMS Plugin

Drag three select boxes respectively, known as Document Types, Cabinets, and Tags. For all the three select boxes, use the Mayan Option Binder to load the values respectively from Mayan.
Make sure to apply basic validator to the select box Document types. 

Image Added

Figure 6: Mandatory select box Document types

Choose the option for the types respectively. Option Label is the message that will be shown when the select box is empty, it is optional. Fill in the required credentials for the plugin to work as intended. 

Figure 37: Joget Form Builder (Select Box with Mayan Option Binder)


Then, drag and drop the Mayan File Upload Element to attach into the form as a form element.

Fill in

Enter the

required credentials to connect to Mayan. In

credentials previously obtained during the login process for Mayan EDMS in order to establish a connection. In the Fields Mapping section, we can now map the select box fields respectively 

Image Modified

Figure 48: Joget Form Builder (Mayan File Upload)


In the datalist builder, we can format the file upload column by using the Mayan File Formatter. Similar configurations can be key in to enable users to download the file directly from datalist.

Image Modified

Figure 59: Joget Form Builder (Mayan File Formatter)


If we do not wish to type the credentials multiple times, the credentials can also be easily added into environment variables, and then use a hash variable to refer to the values in environmental variables. For more information, please refer to Environment Variable - Knowledge Base for DX 7 - Joget | COMMUNITY.


Using the Mayan Plugin

After all the configurations has been done, the user can retrieve the Document Types, Cabinets, and Tags from Mayan EDMS in the select boxes, then choose a file to upload.

Figure 610: Mayan EDMS UI (Form)


After uploading, we can download the file retrieved from Mayan in the datalist using the formatter.

Image Modified

Figure 711: Mayan EDMS UI (List)


At Mayan EDMS, we can view the file being uploaded. If we modify the file here, we can also get the modified newest file in Joget.

Figure 812: Mayan EDMS Homepage with Uploaded File


To upload multiple files and other file upload features, please visit File Upload - Knowledge Base for DX 8 - Joget | COMMUNITY for further information.