Error: main.CRITICAL: Invalid parameter given. A valid $fileId[tmp_name] is expected in Magento 2

Have you ever faced the above-mentioned issue in your local development area? If yes, then we have a solution for you.

Note: This is the temporary solution we don’t recommend changing the core files.

Go to ‘vendor/Magento/Framework/File/Uploader.php’

In function ‘_setUploadField($field)’, comment out ‘$this->validateFileId($field)’ after doing this your function should be simile to following image.


Line numbers in the above screenshot may vary based on your magento version.

Let us know if this solution helped you or not by commenting on our blog

Happy coding 🙂

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

Leave a Reply

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