hmarr/mongoengine — Issue #375: FileField and custom collection
Author: tkloc
Created: 2011-11-30 14:20:48+00:00
State: open

I cannot find a way to store some files in different collection than 'fs'. I need to do something like:

```
class SomeDocument(Document):
private_file = FileField(collection='private_files')
public_file = FileField(collection='public_files')
```

and then configure i.e. nginx with gridfs extension just to server files from public_files collection.

when i generate thumbnails, i use:

```
from gridfs import GridFS
...
fs = GridFS(db, collection=collection)
```

is it possible with mongoengine? am i overlook something?