Question

in magento 2.3.1 below code is work

<field id="file_upload" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Upload File</label>
    <backend_model>Magento\Config\Model\Config\Backend\File</backend_model>
    <upload_dir config="system" scope_info="1">customUpload</upload_dir>
</field>

but in Magento 2.3.3 this not working it give error

Invalid parameter given. A valid $fileId[tmp_name] is expected.

enter image description here

Was it helpful?

Solution

i got the issue in file Magento\Framework\File\Uploader.php in which new method was added so i just comment that method, in function _setUploadFileId($fileId) found the

$this->validateFileId($fileId);  

change to

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

it's work in my case in local server

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top