The immediate utilization of worldwide factors like $_FILES, $_GET, $_POST, can prompt security weaknesses and it is against the Magento coding norms. Accordingly, the immediate utilization of such worldwide factors in Magento might toss a special case and show alerts.

On the off chance that you have taken a stab at utilizing the $_FILES variable straightforwardly in your code, you might experience the accompanying admonition: 'Use of $_FILES is Discouraged in Magento 2'.

That implies you can not straightforwardly utilize the worldwide variable $_FILES in your code and may expect to look for a substitute technique to utilizing it.

You might expect to utilize these worldwide factors at different places, on the off chance that you are fostering any custom usefulness in your Magento store like Magento expansion. Subsequently, here, I have given a total arrangement on how you can involve the $_FILES worldwide variable in your code in a roundabout way to forestall the blunder.

For more info, visit https://meetanshi.com/blog/solved-us...-in-magento-2/

View more threads in the same category: