django-mongotools icon indicating copy to clipboard operation
django-mongotools copied to clipboard

filefield doesn't work

Open mgom opened this issue 14 years ago • 0 comments

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)

mgom avatar Dec 01 '11 09:12 mgom