🔥 Just Launched! Werra Premium Template for HyväSee it in Action

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

By Sanjay JethvaUpdated on May 22, 2025 2 min read

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.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.