django-mongotools
django-mongotools copied to clipboard
filefield doesn't work
Hi
it seems that filefield doesn't work, i mean when i use such a field, it can't save in gridfs ? is it normal ?
traces are :
Exception Type: AttributeError Exception Value: 'InMemoryUploadedFile' object has no attribute 'grid_id'
/virtual-env/lib/python2.7/site-packages/mongoengine/fields.py in validate return None def to_python(self, value): if value is not None: return GridFSProxy(value) def validate(self, value): if value.grid_id is not None: # HERE THE ISSUE assert isinstance(value, GridFSProxy) assert isinstance(value.grid_id, pymongo.objectid.ObjectId)