mongoengine icon indicating copy to clipboard operation
mongoengine copied to clipboard

Consider adding a lock to FileField

Open codeb2cc opened this issue 13 years ago • 1 comments

Although there's no protocol for locking and concurrency for GridFS, I think it's better not to silently omit this problem with FileField. See https://gist.github.com/1980712. Please consider adding a lock or at least try to warn the developer in such case.

codeb2cc avatar Mar 05 '12 20:03 codeb2cc

The result's like:

Create document object...
Writing finished...
>>> Doc:
    ID: 4f55195832c05f4b4a000001
    File: 4f55195832c05f4b53000002
>>> GridFS:
[u'File_19282', u'File_19283']

There are two files in GridFS but we only have one reference.

codeb2cc avatar Mar 05 '12 20:03 codeb2cc