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 relation has an empty object.
I see that the file is not in the File_Live table, so i guess its not published and therefor its not found on the frontend controller.
How can i publish File relations from the ModelAdmin? Basically when a file is uploaded it should be automatically published.
I guess if i use versioned DataObjects i would still need something like this: https://github.com/drzax/silverstripe-bits/tree/master/VersionedModelAdmin
to have publish mechanism on ModelAdmin.
Or is there something builtin in SS4? Would this cascade down to File relations as well?
Edit: regarding versioned DataObjects there is a built in publish button in SS4 just use:
private static $extensions = [
Versioned::class,
];
private static $versioned_gridfield_extensions = true;