Im using SilverStripe4 and the ModelAdmin to manage DataObjects.
The DataObject has a has_one on File. Everything works so far but on frontend controller the File
You can add the following to your DataObject:
private static $owns = ['FileRelationName'];
Example with a relation:
private static $has_one = ['File' => File::class];
private static $owns = ['File'];
Any related object that is being declared as "owned" in this way will be published with the DataObject
itself.