Solved – “Invalid parameter given. A valid $fileId[tmp_name] is expected” In Magento 2.3.3

Ever faced an error that says “Invalid parameter given. A valid $fileId[tmp_name] is expected” In Magento 2.3.3?

I did.

And I found the solution for the same which I have shared with my readers in this post.

I was not able to upload a custom file in system configuration in local Magento 2.3.3. The issue was with the image uploader class of Magento core, due to which the below error was generated:

Solved - "Invalid parameter given. A valid $fileId[tmp_name] is expected" In Magento 2.3.3

Implement the below solution to get rid of the error.

Solution for the error “Invalid parameter given. A valid $fileId[tmp_name] is expected” In Magento 2.3.3:

Go to vendor\magento\framework\File\Uploader.php

In function _setUploadFileId($fileId), change:

to

That’s all for resolving the error.

Please use the Comments section below if you still face the error after implementing the above solution. Post your doubts and I’ll be there to help you out 🙂

Do not forget to share the solution with the Magento community via social media!

Thank you.

5
(based on 18 Reviews)
Solved – “Invalid parameter given. A valid $fileId[tmp_name] is expected” In Magento 2.3.3

Sanjay Jethva

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

20 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *