Merge branch 'master' into dev
This commit is contained in:
commit
525c25b9f6
1 changed files with 5 additions and 4 deletions
|
|
@ -49,10 +49,11 @@ Storage
|
||||||
=======
|
=======
|
||||||
With MongoEngine's support for GridFS via the :class:`~mongoengine.FileField`,
|
With MongoEngine's support for GridFS via the :class:`~mongoengine.FileField`,
|
||||||
it is useful to have a Django file storage backend that wraps this. The new
|
it is useful to have a Django file storage backend that wraps this. The new
|
||||||
storage module is called :class:`~mongoengine.django.GridFSStorage`. Using it
|
storage module is called :class:`~mongoengine.django.storage.GridFSStorage`.
|
||||||
is very similar to using the default FileSystemStorage.::
|
Using it is very similar to using the default FileSystemStorage.::
|
||||||
|
|
||||||
fs = mongoengine.django.storage.GridFSStorage()
|
from mongoengine.django.storage import GridFSStorage
|
||||||
|
fs = GridFSStorage()
|
||||||
|
|
||||||
filename = fs.save('hello.txt', 'Hello, World!')
|
filename = fs.save('hello.txt', 'Hello, World!')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue