Add properties to document in CollectionFS

I want to add a userId to my user’s uploaded pictures, the closest I’ve found is Issues with CollectionFS which suggests adding the image id to the users profile object, but this seems inefficient for what I want.

I’ve seen some suggestions on editing the image metadata but when logging the image.metadata it’s undefined.

Is there a pre save transform option or something?

I took the info from this and changed it from eachFile to each to work with ng-file-upload and handled the metadata thing that way. Adding this in case anyone else has this question.