Open
Description
I've been accessing my other database just fine using db_alias for most collections that do not contain FileField()
or ImageField()
fields. However, for collections with FileField()
or ImageField()
I have not been able to access the file in the other database. Does db_alias
not properly link fs.files and fs.chunks in the other database? Must one somehow add meta = {"db_alias": "OtherDB"}
to fs.files and fs.chunks?
class File(db.Document):
file = db.ImageField()
meta = {"db_alias": "OtherDB"}
for i in File.objects.all():
print i.file # Shows '<ImageGridFsProxy: (no file)>'
print i.file.length # Shows 'AttributeError'