Search code examples
imagefileeditcloudboost

Get Full CloudFile Object for User in CloudBoost


I have assigned a property called image of type CloudFile to my user. It seems to be all OK in database. But when I call to CB.CloudUser.current I can see this:

CB.CloudUser:
    document: Object
        _id: "id",
        image: CB.CloudFile
            document: Object
                _id: "id",
                _type: "file"

As you can see, the file url is not present in data, how can I retrieve it?

Thanks


Solution

  • Found in documentation: https://tutorials.cloudboost.io/en/datastorage/files

    Important: res Object after saving has the CloudFile Object but without Url, though it has the Id. To get the complete FileObject with Url do a fetch over it.

    I will try it!