EZP-23390: IOService loads whole file to get mime type

https://jira.ez.no/browse/EZP-23390

Todo:
- [ ] Get [legacy PR](https://github.com/ezsystems/ezpublish-legacy/pull/1082) merged and change composer.json to reflect that before merging this
To remove when legacy patch is approved.