How can I use $_FILES
(Super global variable )in Magento2
system configuration as per ECG
coding standard. I know I can use in simple form like below. where my_file_uploader is name of fieldId
$uploader = $this->_objectManager->create(
'Magento\MediaStorage\Model\File\Uploader',
['fileId' => 'my_file_uploader']
);
But whats is the fieldId in system configuration ?
I have tried several way but couldn't succeed. I have tried
$uploader = $this->_objectManager->create(
'Magento\MediaStorage\Model\File\Uploader',
['fileId' => '[groups][MY_GROUP][fields][import][value]'
);
but it gives me error like
Undefined index: in /var/www/html/magento21/vendor/magento/framework/File/Uploader.php on line 542
any help will be appreciated
Thanks.