crm:uploadFile

Overview

The <crm:uploadFile> tag is used to display a file upload element on the page.

If only one upload file exists on the page then you can use the default values.

If multiple upload file components exist on the page then it is necessary to:

  • Create for each image a string property for the file name.
  • Handle file uploads overriding handleUploadImage method.

Attributes

NameRequiredTypeDefaultDescription
allowTypesfalseStringThe supported file types that are defined in CRM.COM General Settings.Regular expression for accepted file types, e.g. /(\.|\/)(gif|jpe?g|png)$/
dragDropSupportfalseBooleanfalseSpecifies dragdrop based file selection from filesystem and works only on supported browsers.
idtrueStringnullUnique identifier of the component.
labelKeyfalseStringkey_chooseA valid key defined in translation properties file. Its translation through the glossary will be used as the presentable name of the component.
managedBeantrueStringnullThe name of the Java managed bean class that will be used for retrieving the component values.
uploadModefalseStringadvanced

Mode of the fileupload element. 

Allowed values are simple and advanced.

oncompletefalseStringnull

Defines the function call triggered when upload ends.

parameterNamefalseStringnullDefines the parameter name of the function call.
parameterValuefalseStringnullDefines the parameter value of the function call.
refreshfalseString@formComponent(s) to update with ajax.
sizeLimitfalseStringThe maximum file size that is defined in CRM.COM Formatting Settings.Individual file size limit in bytes.
tipfalseStringnull

A valid key defined in translation properties file. Its translation through the glossary will be used as the information message of the component.

uploadMethodfalseStringhandleFileUploadDefines the function call triggered when a file is uploaded.
visiblefalseBooleantrueControls the visibility of the component.


Getting Started

The following example shows an upload file component.