I want to override public static function getCorrectFileName method of Magento\Framework\File\Uploader, I have check with Preference and Plugin but it is not working for me.
Anyone have idea about this ?
I want to override public static function getCorrectFileName method of Magento\Framework\File\Uploader, I have check with Preference and Plugin but it is not working for me.
Anyone have idea about this ?
Overwriting a static method is impossible, because the interpreter call them using a class name directly, so no one preference could get around this logic. It is a PHP restriction, not Magento. You can create a similar module\class and use it instead of the base Magento module\class.