DEPRECATED
This DAM upload field definition has been deprecated since Magnolia 6.0. It is part of the Magnolia 5 UI framework.
For the updated implementation, see DAM upload field for Magnolia 6 UI instead.
DamUploadFieldDefinition renders a field that is used by the Assets app for uploading assets to the DAM workspace. It extends the basic upload field as follows:
- The uploaded file is mapped to a media type based on its MIME type.
- Default field labels are overridden by media-type labels such as Upload new image.
- Actions for editing images in the media editor.
- Actions for previewing images.
- Thumbnail preview.
It is possible to configure DamUploadFieldDefinition in dialogs or other apps, but keep in mind that the file will be placed in the workspace for which the field has been configured. For example, if you use the field in a dialog for a component template, that file (when uploaded using the field) will be stored in the website, not the DAM, workspace. It is best practice to keep your assets in the DAM whenever possible and link to them using a link field.
class: info.magnolia.dam.app.ui.field.definition.DamUploadFieldDefinition
fieldType: damUpload
DAM upload field properties
Simple DAM upload field definition:
form: tabs: - name: tabUpload label: Upload fields: - name: upload fieldType: damUpload label: Upload asset binaryNodeName: jcr:content editFileName: true
Node name | Value |
---|---|
form | |
tabs | |
tabUpload | |
fields | |
upload | |
binaryNodeName | jcr:content |
fieldType | damUpload |
label | Upload asset |
editFileName | true |
| optional, default is Regular expression to filter allowed files by MIME type. For example, to allow images only, set the value to For more information about the supported pattern, see the |
| optional, default is Maximum file size in bytes. |
The following are label properties. Their values are typically retrieved from a message bundle.
Before upload | |
---|---|
| optional, default is translated Text displayed for the drop zone. |
| optional, default is translated Text displayed on the upload button. |
| optional, default is translated Text displayed when the upload is aborted. |
During upload | |
| optional, default is translated Text showing how many files have been uploaded. |
| optional, default is translated Text showing how many files have been uploaded in relation to the total number of files. |
After upload | |
| optional, default is translated Text displayed on the delete icon. |
| optional, default is translated Text displayed when an error occurs during the upload. |
| optional, default is translated Text displayed for the file format. |
| optional, default is translated Text displayed for the file header. |
| optional, default is translated Text displayed for the file name. |
| optional, default is translated Text displayed for the file size. |
| optional, default is translated Text displayed for the file source. |
| optional, default is translated Text displayed on the upload button. |
| optional, default is translated Text displayed when the file size is greater than |
| optional, default is translated Text displayed when the upload is successful. |
| optional, default is translated Text displayed when the file type is not set in |
| optional, default is translated Text displayed when the upload is interrupted. |
Caption properties specific to the DAM upload field:
<field name> | required Name of the field. |
| optional, default is Text displayed as a tooltip when you hover over the edit action icon. |
| optional, default is Text displayed as a tooltip when you hover over the preview action icon. |
When using the basic upload field in a composite field, use DelegatingCompositeFieldTransformer
. The other transformer classes do not work.