cancel
Showing results for 
Search instead for 
Did you mean: 

Magento2 Admin Product Edit Form file upload - Showing error $_FIles array is empty

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Magento2 Admin Product Edit Form file upload - Showing error $_FIles array is empty

Hey there,
I am working on document upload functionality I have done it already from Frontend. Same functionality I am doing with Magento admin section on Product Edit Form. 
I have added my custom tab on the form and also added the code with "Add More " functionality. 

I get all the input in my "ProductSaveAfterObserver" except uploaded files. It seems like it may be because of enctype="multipart/formdata" but I don't know how to handle this on backend  (or magento already handled those things) . 

When I try to print $_FILES - I get ouput "$_FILES is empty";

Can anyone help me to resolve this ? 

3 REPLIES 3

Re: Magento2 Admin Product Edit Form file upload - Showing error $_FIles array is empty

Hello @maratheprash ,

Please refer the following blog https://webkul.com/blog/create-and-manage-product-file-type-attribute-in-magento-2/

I hope it will help you.

I you like our suggestion please give us kudos and accept it as solution.

Thank you.

Re: Magento2 Admin Product Edit Form file upload - Showing error $_FIles array is empty

Hello @maratheprash 

 

https://github.com/mageprince/magento2-productAttachment

 

please check about an extension.

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento2 Admin Product Edit Form file upload - Showing error $_FIles array is empty

Hello @Sarvagya Pandey ,

Did you created modifer as well?
Please share your code so that I can help you in a better way.

 

Thanks