Magento 2.3.3 Adding Custom File Upload button in system configuration not working in local

magento.stackexchange https://magento.stackexchange.com/questions/292838

  •  16-03-2021
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top