class UserProfile(Document):
user = ReferenceField(User, unique=True)
about = StringField()
photo = ImageField(thumbnail_size=(256,256))
and I had success upload Image file to mongodb
> db.user_profile.find()
{ "_cls" : "UserProfile", "_id" : ObjectId("5032a8e1d9747e1bb3d535bb"), "_types" : [ "UserProfile" ], "about" : "l;kjlk", "photo" : ObjectId("5033faefd9747e7672a17add"), "user" : { "$ref" : "user", "$id" : ObjectId("503142c4d9747e54b358621a") } }
I try to use {{ document.photo.url }} {{ document.photo.get_absolute_url }} but failed
how to get the ImageField's url and it's thumbnail's url?