Get Full CloudFile Object for User in CloudBoost

94 views Asked by At

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

1

There are 1 answers

0
Gabriel Anglada On BEST ANSWER

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!