Press ESC to close

Error: main.CRITICAL: Invalid parameter is 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 a 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 the following image.

vendor/Magento/Framework/File/Uploader.php

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 🙂

Share Post

CodeDecorator

We are a prominent worldwide provider of Magento Extensions and a pioneer in web development solutions.

Leave a Reply

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