Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

filefield doesn't work #6

Open
mgom opened this issue Dec 1, 2011 · 0 comments
Open

filefield doesn't work #6

mgom opened this issue Dec 1, 2011 · 0 comments

Comments

@mgom
Copy link

mgom commented Dec 1, 2011

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant