Fix EZP-23390: Legacy IO loads whole file to get mime type with FS clust...

...er handler

Todo:
- [ ] Get [legacy PR](https://github.com/ezsystems/ezpublish-legacy/pull/1082) merged and change composer.json to reflect that before merging this
Yes, can't really inject services in value objects but can, if we have done that other places, call the native php error function with deprecation level.