2022 Developer Survey is open! Take survey.

Questions tagged [file-upload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Magnento 2 add file upload field on customer registration page and display in backend

I am trying to upload a file(mostly likely image) from customer registration form.
user avatar
1 vote
1 answer
35 views

Notice: Undefined index: extension in /home/xxx/xxx/vendor/magento/framework/File/Uploader.php on line 806

I'm adding Vimeo movies to my products. The first one to add works flawless. If I open another product and try to add another movie I get this error: Notice: Undefined index: extension in /home/xxx/...
user avatar
  • 11
0 votes
0 answers
21 views

How to make a dynamic row column another dynamic row in stores -> configuration

i am trying to make dynamic row field type another dynamic row, it is possible in form, i already have a example, but in ui_component form like this in form it is made by xml, but in stores ...
user avatar
0 votes
0 answers
69 views

Magento 2.4 file Manager Disallowed File Type

I have recently upgraded Magento installation to 2.4.3 and since then in admin area where in CMS pages / Blocks , when I try to upload image I get an error file not uploaded, disallowed file type. I ...
user avatar
0 votes
1 answer
30 views

Uploading Product Brand CSV in magento2

We have 67 products where we have just uploaded but the "Product Brand" has not been selected. I have tried the following: A singular coloumn with title "product_brand": Rudy ...
user avatar
0 votes
1 answer
20 views

File upload form with file resolution check/validation

Our products come with an optional personalised printing service. Customers can choose to print a logo on a shirt. Therefore we need a form with a logo upload function. Which Requires file extension ...
user avatar
0 votes
0 answers
66 views

How to save a frontend user uploaded image in desired folder using knockout js

I want to put a file upload button in my gift message extended module(file path is: Vendor/Magento_GiftMessage/web/template/gift-message.html. I could add the button and display the image as well, now ...
user avatar
  • 11
0 votes
1 answer
90 views

How to upload image in dynamic rows system config?

I need to add a image field in my dynamic rows system config
user avatar
  • 11
0 votes
0 answers
23 views

Customizable Option are not updating price in cart in Magento 2.4.2

I've got a strange problem. I'm on Magento 2.4.2 CE and I've got configurable items that also have some customizable options. Both configurations and customizable options show as intended on the ...
user avatar
0 votes
1 answer
48 views

Can't get file in Post-Controller from input in Phtml

I have a file-input field in my pthml and would like to use it to upload picture files. [...] <div class="field file"> <label class="label&...
user avatar
0 votes
0 answers
30 views

Upload XML file - backend form

I am trying to import data from xml file. I am passing allowed extensions like : $uploader->setAllowedExtensions(['xml','csv']); It's working for CSV but xml file is not uploaded. Error : "...
user avatar
  • 1
1 vote
0 answers
128 views

How to upload image/file using custom customer attribute with Rest API Magento 2?

I have create one custom customer attribute with file type. I want to upload file using rest API and want to store it to custom media path. How to upload file is with customer registration API?
user avatar
0 votes
2 answers
110 views

How can I access data of Laminas\Stdlib\Parameters Object in in Magento 2?

I want to access Laminas\Stdlib\Parameters Object data in that I can access video_url data in magento2. How can I access that object data ? $product = $this->getRequest()->getFiles(); print_r($...
user avatar
0 votes
0 answers
24 views

File upload not working

I am using Magento 2.3.5-p1, when I try to upload any file image (JPG, JPEG, PNG) from CMS or Product Image, it is not working and showing an error. pub folder has -R 777 permissions GD and imagick ...
user avatar
  • 121
0 votes
1 answer
498 views

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 -> Vendor\Module:- Meetanshi\ProductAttachment -> attribute_field_name:- custom_product_attachment -> Media folder ...
user avatar
0 votes
1 answer
47 views

Import CSV file with Ui form and process it - error 404

I want to create a file uploader using Ui form, upload and process it in adminpanel. this is my Ui form code <field name="fileUploader" formElement="fileUploader"> ...
user avatar
0 votes
2 answers
144 views

Add to cart product with custom option "file"

I am trying to add products to cart with custom options. All are working but if custom options is file, it's not working. I've tried everything so far, but no luck. Anyone tried this and have a ...
user avatar
1 vote
0 answers
74 views

Show thumbnail image via Data Provider in Dynamic Rows in admin form magento 2

How can I show image thumbnail (edit form) for dynamic rows created by Magento's Row Pattern using Data Provider / Modifier. Like this link: Magento2 How to add row pattern/dynamic rows to the custom ...
user avatar
  • 749
0 votes
1 answer
20 views

Two files upload is not working in same form in Magento product page

I have a default Magento 2.4.2.installed on my server. I have a page where there are 2 input types of file upload which is not working together. When I remove one input file type then it is working ...
user avatar
0 votes
1 answer
382 views

Knockout JS Implementation with Phtml ReferenceError: Unable to process binding

After a lot of search in this forum I have decided to write a question by myself. I am trying to integrate my knockout page into a phtml file in way to update the input layout after a file has been ...
user avatar
  • 1
0 votes
1 answer
230 views

Adminform uploaded file preview

I added file upload input in AdminHtml Block like this below. $fieldset->addField( 'document', 'file', [ 'name' => 'document', ...
user avatar
  • 828
0 votes
1 answer
23 views

Is it a bad idea to allow magento upload SVG file for CMS page?

One of my user request to ask me to make the Magento able to upload svg file to the CMS. I did some research, some say security issue, but didn't tell much what kind of security issue it may happen. ...
user avatar
  • 508
1 vote
1 answer
56 views

create file attribute to customer image error occur in magento 2.3.6

create custom file attribute for customer, it is not compulsory or required to field but if file is not uploaded then throw error Uncaught TypeError: preg_match() expects parameter 2 to be string, ...
user avatar
  • 11
0 votes
0 answers
29 views

CSV file upload [duplicate]

Can anybody help me with how to upload the CSV file from the frontend of magento2?
user avatar
0 votes
1 answer
46 views

Magento2 - Customer not Able to upload file

I have multi-websites in Magento 2: Url : https://www.lilysprints.co.uk/upload-an-image.html https://nepbhprint.com/upload-an-image.html When I try to upload an image I get this error Path /var/www/...
user avatar
0 votes
2 answers
110 views

How can i upload SVG image on Magento 2.3.6?

Please help me. Now i can't upload SVG image on Magento V-2.3.6. I tried with below code but still can't. <type name="Magento\Cms\Model\Wysiwyg\Images\Storage"> <argument name=&...
user avatar
  • 23
0 votes
1 answer
392 views

Array to string conversion on File upload functionality in Magento2

I am getting this error after I put a file upload button.When I click save I got this error [2021-01-20 05:42:43] main.CRITICAL: Exception message: Notice: Array to string conversion in /var/www/html/...
user avatar
0 votes
2 answers
1k views

How to upload new product images after Adobe Flash Player EOL?

I am wondering how can I upload new product images to my Magento 1 store? Adobe has blocked all Flash content today and I can't see upload button now. However, I am already working on my new Magento 2 ...
user avatar
  • 1
0 votes
0 answers
110 views

How to submit a CSV file in admin and how read it in Magento2?

How to submit a CSV file in admin side and how read it in Magento2?
user avatar
  • 1
0 votes
1 answer
275 views

Validate uploaded file extension product save in Magento 2

I have created a product attribute input type as 'file'. Vendor\Module\Setup\Patch\Data\AddProductPdfProductAttribute.php namespace Vendor\Module\Setup\Patch\Data; public function apply() { $this-&...
user avatar
  • 135
0 votes
0 answers
99 views

How to implement Ajax File Upload in Magento 2?

I have a custom form and there I'm using the default file attachment input type but I want the form uploading as a ajax. I have followed many tutorials but can't find the appropriate solution. Can ...
user avatar
  • 13
0 votes
3 answers
731 views

Magento 2 how to read the uploaded csv from front end form

Here am trying to read the csv file which is uploaded by frontend form. but am not able to open or read the file content. here is form file code. <form class="import-shipping-form" action=...
user avatar
0 votes
0 answers
45 views

How to get controller path for $postUrl for reading CSV in Magento 2?

I have created custom button in Admin Menu for import CSV and created a controller with below path app/code/Tym17/AdminSample/Controller/Adminhtml/SampleTwo/Index.php Used this in my phtml file with ...
user avatar
  • 526
2 votes
0 answers
60 views

knockout data-bind issue on the Frontend Magento 2

I have added file-uploader component in the review form. I have used below code to add browse button in the form. <div class="upload-wrapper" data-bind="scope: 'uploader'"> ...
user avatar
0 votes
1 answer
595 views

magento 2.3 is that posible to upload file in graphql mutation

i wondering is there any way to upload file in magento 2.3.5 via graphql mutation is there way suggest the way ? For REST API how we can upload file in magento 2.3?
user avatar
  • 1,037
1 vote
1 answer
40 views

limit file type in admin custom module

Hi everybody how are you I have a problem to limit the type of file that can be uploaded from the administrator panel in a custom module, I only need the type csv and xls I try a class that extends ...
user avatar
0 votes
1 answer
238 views

Unable to upload a file from UI component using dynamic rows in magento2.3.1

My UI component form fieldset <field name="file"> <argument name="data" xsi:type="array"> <item name="config" xsi:...
user avatar
  • 36
2 votes
0 answers
292 views

How to add upload image in custom payment gateway ( Magento 2.3.5)

I'm very new to Magento. This is what is tried to achieve, an image uploader in custom checkout. But the problem is that I have no idea how to upload the image. The code below is what I had tried. I ...
user avatar
0 votes
1 answer
228 views

Magento admin ajax call file upload

I'm trying to make a ajax call in admin page to upload a csv file in directory then to make a stock update function. In my PHTML: <form method="post" enctype="multipart/form-data" id="ajaxCall" &...
user avatar
  • 828
0 votes
1 answer
102 views

Magento 2.3.4 Custom Module Backend Admin fileUploader (MIME Type) Strict check is enable

I've created a custom module for MG2.2.2 and add file uploader the same as the product file uploader functionality. I've now installed on 2.3.4 and there is an error when I load the form: Refused to ...
user avatar
2 votes
2 answers
2k views

Magento 2 file upload issue - {"error":"The file was not uploaded.","errorcode":666}

I've been fighting an issue with file/image uploading through my custom Catalog module. The upload field is in a programmatically generated UI Component form. Here is how my upload field is defined in ...
user avatar
0 votes
1 answer
554 views

The file was not uploaded. Magento 2 custom module

I'm trying to upload image in my custom module but I always getting the "The file was not uploaded." error. I trace the code and all I can say is the $this->uploader->create() is not working. Here my ...
user avatar
0 votes
1 answer
203 views

Magento 2 Custom UI grid form.php validate upload file extension

I want to check the upload file extension in form.php, I have three upload file options I want to check the upload file is pdf or not. Thanks in advance. my form.php file is namespace Vendor\...
user avatar
2 votes
1 answer
1k views

Magento 2: upload file in frontend

I want to make a function allowed customer upload file in My Account here is description image Any helps? Thank in advance.
user avatar
  • 641
1 vote
0 answers
35 views

Magento 2.3.2: Can't Receive Muliple Files In Email

I made a custom module which has a form for customer, in which customer fill his info, upload multiple files and on Submit, Admin receives an email with customer info and files, but my problem is when ...
user avatar
1 vote
1 answer
401 views

Magento 2 How to send file to another server on predefined location?

I am trying to upload a custom exported CSV to another server FTP on particular location. Step 1: Added FTP Class in constructor protected $ftp; public function __construct( \Magento\Framework\...
user avatar
  • 934
0 votes
1 answer
51 views

Magento 2: I want to upload file in magento 2 from front-end

$uploaderFactory = $this->uploaderFactory->create(['fileId' => 'image']); I want to know 'fileId' and 'image' what is this one mean?
user avatar
  • 1
0 votes
1 answer
251 views

Create product attribute type is file in magento 2

How to create a product attribute in file type in Magento 2 our requirement is a particular product-wise Pdf upload in Magento 2 and shows a product view page in Magento 2. So How can I sort it? ...
user avatar
0 votes
1 answer
852 views

The image file was not uploaded error in Magento 2 while editing the grid form

I am getting the file was not uploaded error in Magento 2 when I edit the form in the Magento 2 backend. When I try to save the form it shows an error. The problem is that it requires me to choose ...
user avatar
0 votes
1 answer
504 views

After Creating Custom PDF Save Magento 2.3

Using dompdf Convert Custom Email Template To Pdf But After Create PDF I Want to Save That PDF into pub/media/customFolder Here My Code :- Define in email_templates.xml :- <?xml version="1.0"...
user avatar
  • 5,586