Questions tagged [file-upload]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 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
39 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
29 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 ...
0
votes
0answers
26 views

File Upload Preview in magento 2

I created a file uploader in Magento 2 with UI component. now I want that when I upload my fule it should display preview like the image below. for now, it only uploads the CSV file. so the preview ...
1
vote
1answer
69 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
23 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
46 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
89 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
83 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
35 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',...
3
votes
3answers
4k views

Export file problem in magento 2.3.2

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
56 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!
1
vote
0answers
39 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
27 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
33 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
23 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
48 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
123 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
58 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
78 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
385 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
232 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
28 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
70 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
153 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
385 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
104 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\...
0
votes
0answers
52 views

Allow customer to upload multiple files via custom options magento 1.9

At the moment we have a custom option "file" in every product and our customers can upload a file. The problem is there can only be uploaded 1 file. How can I change that, in order to let the ...
2
votes
0answers
105 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
385 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
615 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
685 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
3k 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
1k 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
246 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
44 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
61 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
637 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
13 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
51 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
83 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
105 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
454 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
2k 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 ...
0
votes
1answer
736 views

How to upload file to product on Magento 2?

I am developing a Magento 2.2.x e-commerce which requires some of the catalog's products to have an associated PDF (or any other file extensions). At the start, I thought that it was possible to do ...
0
votes
2answers
298 views

Overwriting the uploaded files with same name in ui-component forms

I have a UI-component form for admin which has a field to upload image/file. The file uploading is working all right, after saving the form the name of the image is saved in the database. The issue ...
2
votes
0answers
250 views

Magento 1.9 : Add value to file type custom option when adding product to cart programmatically

I am calling $cart->addProduct($product, $params); for adding product to cart. Where, $product is product collection & $params is as follows as received from product page. Array ( [...
3
votes
1answer
318 views

The use of functions rename(), is_readable(), fopen(), fgetcsv() is discouraged Magento 2

I am checking uploaded file is readable by is_readable function of php but in coding standard check it's shows The use of function is_readable() is discouraged same error show ablow all function.