0

When I try to upload an image in a category I am getting below error.

enter image description here

The issue I found is that the function in the file 'vendor\magento\module-catalog\Model\ImageUploader.php' public function saveFileToTmpDir($fileId) is called two times. One with the parameter 'image' and then with the parameter 'thumb_nail'. The error happens when it is called with the parameter 'thumb_nail'. I couldn't find where that function is getting called. It is supposed to be called from the controller 'vendor\magento\module-catalog\Controller\Adminhtml\Category\Image\Upload.php'. But when I comment out the code in the controller it is still being called. And it is supposed to be called one time with the parameter 'image'

2
  • 1
    Into the default magento, this functionality works fine to think you have installed any third-party extension, and this extension overrides any image upload class that's why this error happens please check first into your extension list. Feb 1 at 11:44
  • Yes. The theme was overriding that function. Thank you!
    – Akhilesh
    Feb 1 at 13:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.