Skip to content

file-upload

Auto Added by WPeMatico

How to delete a file uploaded by FileUploader UI Component without submitting the form

I have prepared an admin form containing a file upload field. This form is configured in an .xml form file. <field name=”files” formElement=”fileUploader” sortOrder=”40″> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”dataType” xsi:type=”string”>string</item> <item name=”label” xsi:type=”string” translate=”true”>Files</item> <item name=”notice” xsi:type=”string”>Maximum… Read More »How to delete a file uploaded by FileUploader UI Component without submitting the form

Magento 2 : How to save file in media folder using custom product attribute?

I have a create product attribute But it’s not save file in pub/media folder -> VendorModule:- MeetanshiProductAttachment -> attribute_field_name:- custom_product_attachment -> Media folder path:- custom/product/attachment MeetanshiProductAttachmentSetupInstallData.php <?php namespace MeetanshiProductAttachmentSetup; use MagentoFrameworkSetupModuleContextInterface; use MagentoFrameworkSetupModuleDataSetupInterface; use MagentoFrameworkSetupInstallDataInterface; use MagentoEavSetupEavSetupFactory; class InstallData implements… Read More »Magento 2 : How to save file in media folder using custom product attribute?

Upload pdf threw ui components

I’m trying to upload a pdf in custom form, but i’m failing. My controller doesn’t seems to receive the data. <field name=”pdf” sortOrder=”100″ formElement=”fileUploader”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”source” xsi:type=”string”>booklet</item> </item> </argument> <settings> <elementTmpl>ui/form/element/uploader/uploader</elementTmpl> <dataType>string</dataType> <label translate=”true”>Booklet… Read More »Upload pdf threw ui components

Upload csv file from a custom admin form issue

This is my fieldset from the uicomponent form: <fieldset name=”image_form_fieldset”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”label” xsi:type=”string” translate=”true”>Form</item> </item> </argument> <field name=”file”> <argument name=”data” xsi:type=”array”> <item name=”config” xsi:type=”array”> <item name=”label” xsi:type=”string”>File</item> <item name=”visible” xsi:type=”boolean”>true</item> <item name=”formElement” xsi:type=”string”>fileUploader</item> <item… Read More »Upload csv file from a custom admin form issue