Questions tagged [file-upload]

The tag has no usage guidance.

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

Magento 2 How to upload mp4 and gifs in wysiwyg

Hi I am trying to upload MP4 or GIFS in wysiwyg. But when I try to upload it I am getting the following error: For MP4 "We don't recognize or support this file extension type." For GIFS &...
  • 47
0 votes
0 answers
6 views

Magento 2 Export file is only partially downloaded

There is a problem loading export files. Files start to download and freeze (download speed drops to 0). It is interesting that the first file I tried to download was loaded, but any subsequent ones ...
0 votes
0 answers
136 views

How to create REST API using multipart/form-data for file upload in Magento2

Can you please provide some guidance (or) Steps on how to create REST API in Magento 2.4 using multipart/form-data for the upload. Please share me the example (or) reference links it would be ...
0 votes
1 answer
97 views

File upload from order view page from admin

<div class="admin__field-control"> <input type="file" name="upload_custom_file" id="upload_custom_file" title="Upload Custom File" ...
1 vote
0 answers
98 views

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&...
  • 1,024
2 votes
1 answer
339 views

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="...
  • 3,736
0 votes
0 answers
85 views

Retrieve download link for customer order custom option file via REST API

I'm trying to get the file download link as it is shown in the confirmation email eg: https://www.example.com/sales/download/downloadCustomOption/id/95434/key/26bfc0c56aaf393e89af/ Through REST I can ...
1 vote
1 answer
427 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.
1 vote
2 answers
352 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/...
  • 11
1 vote
0 answers
196 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 ...
  • 11
0 votes
1 answer
139 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 ...
0 votes
1 answer
29 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 ...
1 vote
1 answer
499 views

How to upload image in dynamic rows system config?

I need to add a image field in my dynamic rows system config
  • 21
0 votes
1 answer
384 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&...
1 vote
0 answers
230 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?
0 votes
3 answers
316 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($...
0 votes
0 answers
136 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 ...
  • 141
0 votes
1 answer
1k 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 ...
0 votes
1 answer
260 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"> ...
0 votes
2 answers
426 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 ...
1 vote
0 answers
113 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 ...
  • 784
0 votes
1 answer
86 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 ...
0 votes
1 answer
626 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 ...
  • 1
0 votes
1 answer
469 views

Adminform uploaded file preview

I added file upload input in AdminHtml Block like this below. $fieldset->addField( 'document', 'file', [ 'name' => 'document', ...
  • 816
0 votes
1 answer
37 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. ...
  • 602
1 vote
1 answer
72 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, ...
  • 11
0 votes
0 answers
30 views

CSV file upload [duplicate]

Can anybody help me with how to upload the CSV file from the frontend of magento2?
0 votes
1 answer
56 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/...
0 votes
2 answers
210 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=&...
  • 23
0 votes
1 answer
558 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/...
0 votes
2 answers
2k 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 ...
  • 1
0 votes
0 answers
352 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?
  • 1
0 votes
1 answer
644 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-&...
  • 175
0 votes
0 answers
189 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 ...
  • 13
0 votes
3 answers
1k 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=...
0 votes
0 answers
153 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 ...
  • 586
2 votes
0 answers
289 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'"> ...
0 votes
1 answer
918 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?
  • 1,057
1 vote
1 answer
70 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 ...
0 votes
1 answer
287 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:...
  • 36
2 votes
0 answers
416 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 ...
0 votes
1 answer
438 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" &...
  • 816
0 votes
1 answer
130 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 ...
2 votes
2 answers
3k 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 ...
0 votes
1 answer
760 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 ...
0 votes
1 answer
320 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\...
2 votes
1 answer
2k 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.
  • 661
1 vote
0 answers
40 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 ...
1 vote
1 answer
575 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\...
  • 954
0 votes
1 answer
139 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?
  • 1