Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [file-upload]

The tag has no usage guidance.

0
votes
1answer
14 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
1answer
23 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
22 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
0answers
11 views

Magento Import prouct attribute type file value not working

I'm trying to import some prouct attribute values on magento 1.9 website. the normal text attributes values are importing fine. (File 3 Title) but site also have attribute type "file", (File 3) ...
0
votes
2answers
24 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
37 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
9 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
29 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
28 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
30 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
0answers
19 views

PDF file uploader component redirect to 404 in custom module admin form

I have created custom module and in admin form there is one pdf upload field. I am using magento fileuploader componenet to upload my pdf but it gives 404 when upload pdf. Here is my ui form element ...
0
votes
0answers
107 views

Upload multiple files into product personalisation

I have a product with 2 custom fields: dimensions (dropdown) and personalization (upload file field). These custom fields were added manually from the admin area under Customizable Options of the ...
0
votes
0answers
49 views

Add a file uploader to payment method in Magento 2

I have a payment method which I need to add an image uploader. I know Magento has its own file uploader Ui component, but I'm not being able to add it to the payment method. I have tried to add ...
0
votes
1answer
205 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 ...
1
vote
1answer
277 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
133 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
44 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
49 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
77 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.
1
vote
2answers
394 views

How to add file upload option to Magento2 contact form?

I want to give users option to upload a file in magento2 contact form and recieve it in the email as attachment. How to do that? Please guide.
1
vote
2answers
64 views

Can't upload file with ajax and Magento 1.9

I have a form with 3 input file, and I need to upload their files without reload the page. I use formData object but when I take params in Magento controller it return [native code]... opcheckout.js ...
0
votes
0answers
12 views

Duplicate files will eat up storage

I have an file type custom option for a product. When the item is added to cart the file is created under: pub/media/custom_options/quote/a/b/ After updating to 2.2.x (from 2.1.9) I've noticed ...
0
votes
2answers
291 views

magento2 Form Validation and FileUpload Plugin not working

i am trying to upload file and it work fine, but form validation is not working when i add file upload JQuery code NOTE: below All code in same file(test.phtml) <form name="questionnaire_form"...
0
votes
1answer
41 views

Change the $_FILES to Magento2 standard [duplicate]

When using below code getting "Direct use of $_FILES Superglobal detected" error. Can anyone suggest how to use in Magento2. $file = $_FILES["r_dea_license"]["name"]; $array = explode('.'...
0
votes
0answers
51 views

Magento 2 : admin form image file validation not working in server

In my form i am using this code to upload the file. $fieldset->addField( 'banner_image', 'image', [ 'name' => 'banner_image', 'label' => __('...
1
vote
0answers
50 views

Magento 1.9 - Upload file from Product View page

I have this code to upload file/image but don't know in which file I need to add this code to work. public function saveAction() { if ($data = $this->getRequest()->getPost()) { if (isset($...
1
vote
3answers
845 views

Magento 2 : File upload form front end in Custom Module

I am getting this error when I submit the form from the front end. Although I set the required extension in the setAllowedExtensions Exception #0 (InvalidArgumentException): Disallowed file type. ...
0
votes
0answers
26 views

How to add Fileupload field in custom grid without edit the form in magento1.9?

I have a custom grid and I don't need to edit the form because all the content we are editing directly from the grid using ajax but I do not know how to add file upload field in grid directly to ...
0
votes
0answers
48 views

Configurable Product Turning into Simple Products Mass Import CSV Magento2

Hello StackExchange community! I am having a serious issue with my Magento CSV mass product import to Magento2. I have about 1800 SKUs to upload and am testing a configurable product and their ...
4
votes
1answer
66 views

Script error while uploading category image in Magento 2.1.9 using IE11

I have a Magento 2.1.9 installed. When I try to upload an image for a category from backend in the IE11 browser it shows a script error SCRIPT438: Object doesn't support property or method 'set' ...
0
votes
1answer
76 views

Magento 2.2: Weird $_files array after image upload

currently I'm trying to develop an image upload in the Magento admin area with ui components. My fieldset declarations looks like this: <fieldset name="slide"> <argument name="data" ...
0
votes
0answers
25 views

Error adding “downloadable product” file as an admin

When logged in as admin, I can create a new downloadable product without issue up until I have to add the actual file to be downloaded. When I click "Upload files" I see the following error in the ...
0
votes
0answers
290 views

How to get file size in magento 2?

I want to get file size. Currently I used get_headers function of php to get file size by Url. $url = "http://www.example.com/magento2/pub/media/myfolder/m/a/myfile.zip"; $data = get_headers($url, ...
0
votes
1answer
227 views

How to upload file attribute for document in customer registration page and displayed document link in admin customer Edit page

I want to add upload document in customer registration page and display same document in admin customer account page.I have created input type file field and saved document in customer respective ...
0
votes
0answers
106 views

Video/Image file upload module in Magento2

How to create Video/Image file upload module in Magento2
0
votes
0answers
50 views

Magento 2 : Error while saving customer attribute with input type file (Image)

I am trying to save customer attribute which is Image Type. I have follow This Link But, I can able to save Customer Object but it can't able to render image at Admin Customer View. Below is my ...
0
votes
0answers
32 views

Custom Module: Button to open media dir

Is there a way to use the Insert Image button in a custom module not as part of a Wysiwyg editor? It will have the same function as the insert image to upload and select the image to insert but the ...
15
votes
1answer
359 views

How to Recreate Magento 2 backend image upload in frontend

In Magento 2 there's a single image uploader look like this: it uploads the image using AJAX and will return JSON serialized containing the uploaded image information. Is there a way to recreate this ...
1
vote
0answers
34 views

Need to add new file format to upload from front end and add it to cart on Magento 1.8

I have Magento 1.8. I added the custom options in the product to upload the file. That product will work like configurable product and will get added to the cart. Now i want to have the .stl file ...
1
vote
0answers
628 views

make a custom attribute on catalog to upload a file

I want to upload a file from admin side for a user to show on product description page.I just want to make a file uploaded for now on admin. In store->attribute. how to achieve this in magento2 ? I ...
0
votes
0answers
118 views

PDF file via WYSIWYG editor, I am facing file size issue

While uploading PDF file via WYSIWYG editor, I am facing file size issue. If the file is more than 1 MB. and files up to 1 MB getting upload quickly. Large size image is working but PDF is not. As ...
1
vote
0answers
29 views

Image upload and Preview on product [closed]

How can a customer upload an image and then show the product as a preview and maybe customize it?
0
votes
0answers
152 views

Magento 2 disable file preview in admin form

I created grid form using UI component. In my UI form I use file uploader. How can I disable image preview? Because I upload pdf file and preview are showing blank square. My form field <field ...
1
vote
1answer
253 views

Handling file uploads behind a load balancer

When your website is behind a load balancer how can you ensure that file uploads (e.g., custom option) goes to the correct server? I think having multiple servers is pretty common but I can't seem to ...
5
votes
2answers
4k views

Read input csv file and convert it to array

I have an input file form in phtml to import data from csv file type like this: <div class="import-shipping"> <div class="header"> <h4>CSV File:</h4> </div> &...
2
votes
2answers
2k views

File upload in magento 2

We are using $_FILES to check files post data in core php. Which class can use in Magento 2 to check files post data? Thanks
0
votes
0answers
384 views

Magento: Custom file upload from product edit page

i have created a custom tab inside the product page (backend) and need to be able to upload a file from there. Here is my code: Vendor/Module/UI/DataProvider/Product/Form/Modifier/Attachements.php ...
1
vote
2answers
1k views

Magento image size increase after upload

We have a very strange issue using Magento 1.9.3.6 After uploading an image using the image uploader both for CMS Pages and Product we see that the image size increase 3-times. The image we are ...
0
votes
0answers
64 views

Error in File Upload Product Options - Please specify the product's required option(s)

Error in File Upload Product Options - Please specify the product's required option(s).
1
vote
1answer
1k views

I just want a file upload code in magento 2

i already sent the file from phtml to controller and in controller i need to save that file into a directory here is html and php code <form class="myformdynamic" onsubmit="return Validate()" ...