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:

$this->validateFileId($fileId);

to

//$this->validateFileId($fileId);

That’s all for resolving the error.

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

Thank you.

Table of Contents