Questions tagged [file-upload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 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
29 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
20 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 ...
0
votes
0answers
90 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
28 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
48 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
24 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\...
0
votes
1answer
46 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
100 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
25 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
69 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
186 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
148 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
36 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',...
5
votes
4answers
6k 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
97 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
48 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 ...
0
votes
0answers
37 views

Magento 2 - Unable to write in file

I have a bug: I cannot write to the file. D:/xampp702/htdocs/magento221717dt/pub/errors/maintenancemode/page.phtml Thanks.
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
27 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' => '...
2
votes
0answers
64 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
231 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
85 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
142 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
502 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
323 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
36 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
74 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
169 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
492 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
118 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
117 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 ...
0
votes
1answer
499 views

magento2 file upload Pdf not working

i have create controller for save data but i have not save pdf file so please help me how can fix this issue Thanks!! <?php public function execute() { $resultRedirect = $this->...
1
vote
3answers
1k views

Magento 2.3 can't upload product images

Every time i try to upload product images on my Magento 2.3 website, i get the following error: A technical problem with the server created an error. Try again to continue what you were doing. If ...
0
votes
1answer
849 views

Magento 2.3 upload_max_filesize max at 8M for import feature

I adjusted upload_max_filesize in magento 2.3 and i can change the value to be anything between 2M and 8M. If i put anything else like 85M, 9M, 50M, etc the Admin bar > System > Data Transfer > ...
3
votes
2answers
878 views

Magento 2 - Customer Custom File Attribute unable to save

I have Created my own Customer Attribute, it was a File attribute. While try to upload a file in that, it shows error like, "<File Field Name>" is not a valid file. While checking in Media ...
1
vote
3answers
4k views

Magento 2.3.0 - Transactional Email > Logo Image upload not working

Running magento 2.3.0 on php 7.1 I'm trying to upload an image for Content > Design: Configuration > Transactional emails > Logo Image And get the following error. A technical problem ...
4
votes
2answers
2k views

Magento 2.3 : File Upload issue in UI Component Form

I have created a form with Ui component. It contains a file field. When I upload a file it shows an error in the console Here is my code Ui component form <field name="ffl"> ...
0
votes
1answer
263 views

error “File Input” is required value Magento 2

I have a customer attribute that is "File Input", type is file and require is true but I do not let it show in customer register. When I try to create an account it displays the error like this: How ...
0
votes
0answers
1k views

How to upload and read csv file import into database in magento 2?

How to upload the csv file and read import into the database magento 2? <?php /** * XXXX_ProductImport extension * @category * @package XXXX_ProductImport * @copyright Copyright (c) 2018 * @...
1
vote
0answers
47 views

New security threat to Magento caused by it using jQuery-File-Upload?

Magento 2 uses the Blueimp jQuery File Upload Plugin v5.16.4 which has recently been identified at posing a security risk to web applications which use it. Is this an issue for Magento and should ...
0
votes
2answers
77 views

Files uploaded through Manage Attachments changes filename - how to keep original name?

Is it possible to deactivate the auto renaming of file uploaded through manage attachments? e.g. test.PNG is getting saved as File-1540823510.png on the webserver. Is there a way to deactivate this ...
0
votes
1answer
807 views

Magento 2 : admin file field max upload size

I'm trying to restrict the weight of the uploaded file in admin, I found the 'maxFileSize' in Magento documentation but it's not working : $fieldset->addField( 'files', 'file', [ 'name' =...
1
vote
0answers
14 views

Handling email attachments through Filesystem, correct or unnecessary?

I have a custom contact form for sending emails. One of the options is to attach a PDF. This is the part of the controller that handles checking the attachments and uploading them. $files = $...
0
votes
2answers
69 views

Upload large files from system config not working

I'm trying to Upload a zip archive to media from System/Configuration but when I choose a large file (e.g. 35MB) it redirect to Dashboard and I get the error Invalid Form Key. Please refresh the ...
0
votes
0answers
100 views

Magento2: change output template of field in system.xml

I have a file upload field in my system.xml file, declared in this way: <field id="custom_file_upload" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="6" ...
1
vote
0answers
109 views

Can't Upload products via CSV file

I am trying to import products from import/export profile in magento 1.9. I am trying to import a csv file but the csv file is not being imported and the following error is being displayed. Does ...
0
votes
1answer
536 views

Magento2.2 - File Upload Field from Order Comment Section

I have override following files for Displaying File Upload Fields - Magento_Sales::order/view/history.phtml To Process Comments -Magento\Sales\Controller\Adminhtml\Order\AddComment To Display Block ...
2
votes
1answer
3k views

Using SVG logo in Magento 2.2.4

I am trying to upload an SVG logo for my Magento website, but it is not allowing me to upload an SVG file. It says that it is an unsupported file. Any idea how to resolve this? Based on internet ...