Pro Forms - File Upload - Initial file from acf gallery

I’m setting up a front end profile handler using a pro form file field to handle the user avatar image.

The data is stored to and acf gallery field. Upload works fine, and gallery data is correctly saved.

Setting the field to fetch data from the acf field to populate the initial file for the form field also works, but the loader “breaks” showing an image loading error placeholder when the field is empty (i.e. the user removes the image, saves the profile etc…)

I don’t see a way to conditionally load the files so i’d expect the bricksforge file field to check if the fetched data instead of throwing a front end error.

@Daniele banged my hand on this for a while.

It looks like there’s some inconsistency in the way acf values are set.

If I set the update post meta option to use the :array flag on the the post meta value twig the value is correctly updated, but if the field is empty… it’s passed as an array anyway and it breaks the acf output value (which will be an array containing an empty node instead of an empty array/false)

If i don’t use the array flag… the value somehow looks correct on the backend, but then initial files are not loaded.