Actually I'm refering to #19247 for PHP 7.2 specific issue.
that partially solved my issue but can't able to override that file.
I tried using preference here's what I tried.
<preference for="Magento\Framework\File\Uploader" type="Vendor\Module\File\Uploader" />
But doesn't seems to work. Any idea ?