Skip to main content
Skip table of contents

Binary Widget

Definition

The Binary Edit Widget allows to configure the display/edit of a binary attribute.

image-20250617-151206.png
image-20250620-100520.png

Configuration

Properties

Properties name

Type

Mandatory

Description

Values (default value in bold)

acceptedFileTypes

-

NO

Allows to list the allowed image formats.

-

maxFileSizeKb

Integer

NO

Defines the maximum size (in KB) of the imported image.

5000

fileIcon

Boolean

NO

true, false

uploadIcon

Boolean

NO

Allows to display or not the "upload" logo in the field.

true, false

filenameI18nKey

String

NO

An i18n key that can reference the current object attributes in order to name the binary file when downloading it through the widget.

Ex:

CODE
identity card - {object__firstName} {object__lastName}

(the file extension will be set automatically based on the uploaded file and should not be set as part of the key).

Note that a limit of 255 characters will apply to the filename.

If left empty, the filename will be the attribute id.

-

acceptedFileTypes properties

Properties name

Type

Mandatory

Description

Values (default value in bold)

Image

Image Edit

Image Display

fileType

String

NO

Defines the list image formats.

If the user update an unauthorized file, he will be warned by a pop-up.

*, PNG, JPEG...

If value = *, all formats will be accepted.

(error)

(tick)

(error)

Example

CODE
<widget id="photo" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<editor>
        	<editWidget xsi:type="ctdbum:BinaryEditWidget">
            	<hidden>false</hidden>
                <config>
                    <required>false</required>
                    <acceptedFileTypes>
                    	<fileType>*</fileType>
                    </acceptedFileTypes>
                    <maxFileSizeKb>5000</maxFileSizeKb>
                    <fileIcon>false</fileIcon>
                    <uploadIcon>true</uploadIcon>
                    <filenameI18nKey>tenant.ui.upload.myfilename.title</filenameI18nKey>
				</config>
			</editWidget>
		</editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ_WRITE</mode>
        <multiValued>false</multiValued>
        <override>true</override>
	</config>
    <attributeId>photo</attributeId>
</widget>

Read Next

  • Features

    Design screens and business features to manage objects.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.