Messing with the code didn't work for me.
The actual solution was to install the fileinfo module for PHP
I solved it by enabling the PHP fileinfo extension. https://prnt.sc/vcj8z0
For me updating the php modules worked