Created a custom image section using new tab customer_form.xml in customer admin panel, after upload the image using <imports>
& <exports>
to preview the image.
- When remove the
<exports>
image preview works , but unable to send the new file data - When remove the
<imports>
image preview will not work , but new file data send
Someone please give the solutions for this
Customer_form.xml
false
Dealer Adon Information
fieldset
customer
Dealer Information
customer
1
true
true
<field name="logo">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">customer</item>
<item name="label" xsi:type="string" translate="true">Thumbnail</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
<item name="required" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="number">40</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="url" path="customer/file/customer_upload"/>
</item>
<item name="imports" xsi:type="array">
<item name="value" xsi:type="string">${ $.provider }:data.customer.logo</item>
</item>
<item name="exports" xsi:type="array">
<item name="value" xsi:type="string">${ $.provider }:data.customer.logo</item>
</item>
</item>