How to configure the Upload with Metadata option

In File Manager, files can be optionally uploaded with metadata. By default, no metadata is uploaded.
Metadata configuration occurs in the "fileMetadataAttributes" section of the configuration-wui.json file.

The first and mandatory step to show the arrow and its Upload with metadata menu entry is to set the "enable" parameter to true.

"config": {
    "fileMetadataAttributes": {
      "enable": true,

The Upload button in the main page will have an additional arrow with the Upload with metadata entry.



Hint!


"If you still do not see the arrow and the menu entry, empty the cache of your browser."




Then, in the fields section you can configure the options that you want to appear in the Upload with metadata window.

"config": {
    "fileMetadataAttributes": {
      "enable": false,
      "fields": [
        {
          "name": "classification",
          "mandatory": true,
          "values": [
            "public",
            "secret"
          ],
          "defaultValue":"public",
          "labels": {
            "it": "Livello di riservatezza",
            "en": "Classification level"
          }
        },
        {
          "name": "sendernote",
          "mandatory": false,
          "maxLength":80,
          "defaultValue":"",
          "labels": {
            "it": "Nota del mittente",
            "en": "Sender note"
The sample file contains a Classification Level mandatory field with 2 entries: public and secret. 

      "fields": [
        {
          "name": "classification",
          "mandatory": true,
          "values": [
            "public",
            "secret"
          ],
          "defaultValue":"public",
          "labels": {
            "it": "Livello di riservatezza",
            "en": "Classification level"
          }
        },

Where:

  1. "name" is the ID name of the metadata.
  2. "mandatory" is set to true and an asterisk * will appear in the dialog window to warn the user that the field cannot be empty.
  3. The "values" section adds a drop-down list of pre-configured values. In the sample, “public” and “secret” are listed.
  4. The "labels" section contains the label that will appear for the value you are configuring. Multiple languages are supported.

Moreover, the sample file contains an optional Sender Note field.

"name": "sendernote",
          "mandatory": false,
          "maxLength":80,
          "defaultValue":"",
          "labels": {
            "it": "Nota del mittente",
            "en": "Sender note"

Where:

  1. "name" is the ID name of the metadata.
  2. "mandatory" is set to false and the field is optional.
  3. "maxLength" is the maximum number of characters that the user will be able to enter in the field.
  4. "defaultValue" is the default value appearing in the field. In this sample, the field is empty.
  5. The "labels" section contains the label that will appear for the value you are configuring. Multiple languages are supported.