Versions Compared

Key

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

Javadoc resource link
rangeHigherVersion6.0
classNameinfo.magnolia.ui.form.field.definition.BasicUploadFieldDefinition
renderTypeasynchronous
 renders a field to upload a file to a Magnolia JCR workspace.
The file is stored on the node of the current context of the form (within a dialog or subApp), which could be a content app item, a page or a component of a page.

class: info.magnolia.ui.form.field.definition.BasicUploadFieldDefinition

fieldType: basicUpload

The basic upload field has three states. You can set properties for each.

  • Empty is the starting point where no file has been selected. You can select a file with the button or drag it into the box.

Image Added

  • In progress displays a progress bar and incremental percentages and uploaded/total ratio.

Image Added

  • Completed displays a success notification and summary of file info.

Image Added

Table of Contents

Basic upload field properties

Simple basic upload field definition:

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
form:
  tabs:
    - name: tabUpload
      label: Upload
      fields:
        - name: upload
          fieldType: basicUpload
          label: Upload
          allowedMimeTypePattern: text/xml
          binaryNodeName: import
Localtab
titleJCR node
Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Node name

Value

Mgnl n
form


Mgnl n
tabs


Mgnl n
tabUpload


Mgnl n
fields


Mgnl n
upload


Mgnl p
allowedMimeTypePattern

text/xml

Mgnl p
binaryNodeName

import

Mgnl p
fieldType

basicUpload

Mgnl p
label

Import XML file

Include Page
_referencing fields shortcut info
_referencing fields shortcut info

Include Page
_Common upload field properties
_Common upload field properties

Common field properties:

Include Page
_Common field properties
_Common field properties

Info

When using the basic upload field in a composite or multivalue field use the DelegatingCompositeFieldTransformer. The other transformer classes do not work.