{"id":711,"date":"2019-12-03T08:43:58","date_gmt":"2019-12-03T08:43:58","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/12\/03\/solved-invalid-parameter-given-a-valid-fileidtmp_name-is-expected-in-magento-2-3-3\/"},"modified":"2025-05-22T15:17:35","modified_gmt":"2025-05-22T09:47:35","slug":"solved-invalid-parameter-given-a-valid-fileidtmp_name-is-expected-in-magento-2-3-3","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/solved-invalid-parameter-given-a-valid-fileidtmp_name-is-expected-in-magento-2-3-3\/","title":{"rendered":"Solved &#8211; &#8220;Invalid parameter given. A valid $fileId[tmp_name] is expected&#8221; In Magento 2.3.3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ever faced an error that says \u201c<em><strong>Invalid parameter given. A valid $fileId[tmp_name] is expected<\/strong><\/em>\u201d In Magento 2.3.3?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I did.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And I found the solution for the same which I have shared with my readers in this post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I was not able to upload a custom file in system configuration in local Magento 2.3.3.&nbsp;The issue was with the image uploader class of Magento core, due to which the below error was generated:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2019\/11\/Solved-Invalid-parameter-given.-A-valid-fileIdtmp_name-is-expected-In-Magento-2.3.3-1024x153.png\" alt=\"Solved - &quot;Invalid parameter given. A valid $fileId[tmp_name] is expected&quot; In Magento 2.3.3\" class=\"wp-image-6968\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Implement the below solution to get rid of the error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution for the error \u201cInvalid parameter given. A valid $fileId[tmp_name] is expected\u201d In Magento 2.3.3:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go to <strong><strong>vendor\\magento\\framework\\File\\Uploader.php<\/strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In function&nbsp;<strong>_setUploadFileId($fileId)<\/strong>, change:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$this-&gt;validateFileId($fileId);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/$this-&gt;validateFileId($fileId);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s all for resolving the error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not forget to share the solution with the Magento community via social media!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever faced an error that says \u201cInvalid parameter given. A valid $fileId[tmp_name] is expected\u201d In Magento 2.3.3? I did. And I found the solution for&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":15162,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/711\/revisions\/15162"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}