While my text fields are rendered correctly, the two files fields (coverimage, video) generate objects with two empty properties, content and translations:
Well, you always have to make sure you have an object before you call any class member method (see basic OOP recipe), here you can use the null-safe operator instead of an if statement to keep the code shorter.
I’ve uploaded a file on every project and it gets rendered perfectly on my php templates so I don’t understand why there seems to be no object and the returned value is null ?
Ok, sorry, my bad, the inventory() method doesn’t exist for files. I guess you best bet is probably to create a custom array with the data from the file that you need.