Saving file object to repo before adding to FileReference obj.