Questions tagged [file-upload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 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/...
1
vote
2answers
188 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 ...
0
votes
0answers
22 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?
0
votes
0answers
20 views

Magento 2 file uploader not working in other theme in frontend

I am using magento inbuilt file uploader component in my theme, I have 5 types of different themes and have called uploader component from one of the custom module, the issue is I cannot see file ...
0
votes
1answer
40 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-&...
0
votes
0answers
20 views

Connecting SFTP in Magento 2

I am still a newbie in Magento. I am looking for a way to read csv file for automating product upload to Magento. I will be receiving the csv file that contains the product attributes (data and images)...
0
votes
0answers
14 views

How to create REST API to upload image into customer custom fields

I am using Magento Enterprise Solution. Where I have created a few custom fields (File Type) for a customer. I want to get help to create REST API to upload an image into these fields by using REST ...
0
votes
0answers
17 views

validate customer custom attribute file upload extenssion

I have created one file customer custom attribute using below code. Currently it allow all extenssion to upload. I would like to only allow .pdf or .jpeg only. It is used to upload on both frontend ...
0
votes
0answers
20 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 ...
0
votes
3answers
60 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
0answers
25 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 ...
0
votes
0answers
11 views

Magento 2.3.4: Customer File Attribute not working from admin

I followed below blogs in order to create a customer file attribute. https://blog.chapagain.com.np/magento-2-customer-image-file-upload-in-registration-account-page/ https://meetanshi.com/blog/create-...
2
votes
0answers
36 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
1answer
79 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?
0
votes
0answers
84 views

Magento 2 error:The file doesn't exist. Verify the file and try again

When I trying to upload CSV from admin site in var folder Magento through below error Attention The "/var/www/html/pub/media/var/www/html/var/test/c/a/test_3.csv" file doesn't exist. Verify ...
1
vote
1answer
22 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
0answers
25 views

Exception #0 (Exception):Array to string conversion …/framework/App/Config.php on line 84 MagePrince productAttachement

Magento 2.1.9 CE Installed latest compatible extension productAttachemnt from MagePrince. Exception #0 (Exception): Notice: Array to string conversion in /var/www/vhosts/.../httpdocs/vendor/magento/...
0
votes
1answer
85 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:...
2
votes
0answers
141 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
1answer
58 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" &...
0
votes
1answer
52 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 ...
1
vote
1answer
817 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
1answer
117 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
0answers
179 views

Magento 2 Read data from json file

I want to import products from a json file. How can I read the data from the json file as array? Here is my sample json [ { "id": 632910392, "title": "IPod Nano - 8GB", "...
0
votes
1answer
70 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\...
1
vote
1answer
82 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.
1
vote
0answers
31 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
1answer
184 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\...
0
votes
1answer
29 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?
0
votes
1answer
123 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? ...
0
votes
1answer
363 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 ...
0
votes
1answer
273 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"...
1
vote
0answers
41 views

Magento 2: Upload image without Ui component

how can I upload an image by this way, please help me, thank you $fieldset->addField( 'image_field_name', 'image', [ 'name' => 'image_field_name',...
6
votes
4answers
12k views

Export file problem in Magento 2.3

Error: "Message is added to queue, wait to get your file soon" enter code here Open admin panel/system/Data Transfer/Export After that select all export setting and click the continue button. When ...
0
votes
1answer
185 views

Magento 2 Dynamically Add file uploader in system config

How to add a file uploader render in a dynamically added rows? something like: But in dynamically added Like: Let say before or after drop down and the input text field? Best!
2
votes
0answers
62 views

How secure is the Magento 2 File Uploader

I recently added my own form to the Magento frontend. The form contains a file type input, an used the file uploader class to save the file. But I was wondering how save this class is? I already ...
2
votes
1answer
34 views

Uploading a file for admins only

I'm trying to save some files after a form submission. Here's my function that currently saves the file(s): private function uploadFile($id) { $uploader = $this->_fileUploaderFactory->...
2
votes
0answers
28 views

Multilple file upload not working in magento2.3.0?

I am not able to upload multiple files in magento2.3.0? Here is my code: $fieldset->addField( 'commercial_pic', 'file', [ 'name' => '...
3
votes
0answers
101 views

Magento 2: How to implement multiple image uploader in admin form using UI component

I'm using UI component for building admin form. In the form, I have an image uploader field. Using this uploader, I'm able to select only one image to upload. But I need to upload multiple images. ...
0
votes
2answers
520 views

Validation for file type not working in File Upload in Magento 2 Store Configuration

I am following below Article to upload file in store configuration: https://www.mageplaza.com/devdocs/how-file-upload-sytem-configuration-magento-2.html I have defined custom backend model as ...
0
votes
1answer
142 views

Magento2: How to enable Docx, Doc files on wysiwyg to upload attachments to static blocks?

How I can enable the Docx, Doc or how can I do it on Magento 2 for uploading Docx, Doc attachments to static Blocks? Thanks
1
vote
1answer
418 views

Magento 2 :upload file type restrict to pdf only

I have created a custom file type customer attribute $customerSetup -> addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'price_agreement', [ 'type' => 'text', '...
0
votes
1answer
847 views

Upload local file to sever SFTP via curl php

I am trying to implement upload local file to server via sftp curl method but facing File upload error. Error number: 7. Here is my code. <?php $ourFileName = "/var/www/html/example.com/...
0
votes
1answer
520 views

Magento 2 : Added field for video, music ( mp4 , mp3) upload in admin form

I try to upload image, video or music player, for that I use $uploader->setAllowedExtensions(['mp4', 'mp3', 'jpg', 'jpeg', 'gif', 'png' ]); , but it doesn't work. Anyone have idea about this problem? ...
0
votes
1answer
41 views

How to change “input file” storage location in customer account edit form

I have added a customer attribute called "My File". It gets added in customer account edit form. By default, the selected file(My File) is saved under "pub/media/customer" directory. In my case, I ...
3
votes
1answer
91 views

Magento 2 : How to set $_FILES = $file in Magento 2.3.0 with Magento Coding Standard?

I had develop one module and it works currectly But When I have check Coding standard using phpcs it will provide me Error in php coding standard --standard=MEQP2 Error is i have get result of $...
0
votes
1answer
221 views

Magento2 Admin UI Component: On fileUploader ajax completion in ui component, how can I reload the page it is on?

I have a grid that just shows a collection of a specific table. below is a file upload component that I want to use for CSV upload, that will replace all old collection. Image reference is below: ...
1
vote
0answers
716 views

How i can get Image/file Extension from uploaded image using _fileUploaderFactory in Magento 2

I am Working on custom Module In Magento 2 I m trying to upload image to database using fileUploaderFactory. try { $uploader = $this->_fileUploaderFactory->create(['fileId' => 'image'...
1
vote
0answers
138 views

Display Multiple Images In Admin Edit Form Magento 2

Display Multiple Images from database in custom admin edit form This Is My Form.php file <?php namespace Magneto\AppNotification\Block\Adminhtml\Form\Edit\Tab; use Magento\Backend\Block\...
2
votes
0answers
143 views

Magento 1.9 - Upload multiple files from product view page front end

I am using product custom option "input type file" to upload multiple files from front end (for customer) but can't upload multiple files. I need help to uploads multiple files from front end using ...