Versions Compared

Key

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

Javadoc
rangeHigherVersion2.2
className0info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition
renderTypeasynchronous
 renders a field for uploading files into a Magnolia workspace. This field is used by the Assets app for uploading assets into the dam workspace. It extends the basic upload field field and adds the following enhancements to the completed view:

  • The uploaded file is mapped to a media type based on its MIME type.
  • The default field labels are overridden with Media type specific labels such as Upload new image.
  • Actions for editing images in the media editor.
  • Actions for previewing images.
  • Thumbnail preview.

Classclassinfo.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition

...

Here's the completed view for an uploaded video.

 


Table of Contents

DAM upload field properties

...

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
form:
  tabs:
    - name: tabUpload
      label: Upload
      fields:
        - name: upload
          class: info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition
          label: Upload asset
          binaryNodeName: jcr:content
          editFileName: true
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
binaryNodeName

jcr:content

Mgnl p
class

info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition

Mgnl p
label

Upload asset

Mgnl p
editFileName

true

...

It's possible to configure the

Javadoc
rangeHigherVersion2.2
className0info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition
in
renderTypeasynchronous
 in dialogs or other apps, but keep in mind the file will placed into the workspace for which the field has been configured. For example, if you use the field in a dialog for a component template, then that file, when uploaded using the field, would be stored in the website workspace not the dam workspace. This is the same behavior as all other fields. It's best practice, whenever possible, to keep your assets in the DAM and link to them using a link field.