The database where this store is located.
The prefix of this store. The files
and chunks
collections will be actually named ${prefix}.files
and ${prefix}.chunks
.
(Since version 0.19.0) Internal: will be private
Returns a cursor for the chunks of the specified file.
Returns a cursor for the chunks of the specified file. The cursor walks the chunks orderly.
The chunks
collection
Creates the needed indexes on the GridFS collections
(chunks
and files
).
Creates the needed indexes on the GridFS collections
(chunks
and files
).
Please note that you should really consider reading http://www.mongodb.org/display/DOCS/Indexes before doing this, especially in production.
A future containing true if the index was created, false if it already exists.
Returns whether the data related to this GridFS instance exists on the database.
Prepare the information to save a file.
Prepare the information to save a file. The unique ID is automatically generated.
The files
collection
Finds the files matching the given selector.
Finds the files matching the given selector.
The type of the selector document. An implicit Writer[S]
must be in the scope.
The document to select the files to return
Reads the given file and writes its contents to the given OutputStream
Removes a file from this store.
Removes a file from this store. Note that if the file does not actually exist, the returned future will not be hold an error.
the file id to remove from this store
Removes a file from this store.
Removes a file from this store. Note that if the file does not actually exist, the returned future will not be hold an error.
the file entry to remove from this store
Writes the data provided by the given InputStream to the given file.
Produces an enumerator of chunks of bytes from the chunks
collection
matching the given file metadata.
Produces an enumerator of chunks of bytes from the chunks
collection
matching the given file metadata.
the file to be read
(Since version 0.17.0) Will be moved to reactivemongo.play.iteratees.GridFS
Returns an Iteratee
that will consume data to put into a GridFS store.
Returns an Iteratee
that will consume data to put into a GridFS store.
the type of the id of this file (generally BSONObjectID
or BSONValue
).
the metadata of the file to store.
Size of the chunks. Defaults to 256kB.
(Since version 0.12.0) Use iterateeWithMD5
Returns an Iteratee
that will consume data to put into a GridFS store,
computing the MD5.
Returns an Iteratee
that will consume data to put into a GridFS store,
computing the MD5.
the type of the id of this file (generally BSONObjectID
or BSONValue
).
the metadata of the file to store.
Size of the chunks. Defaults to 256kB.
(Since version 0.12.0) Will be moved to reactivemongo.play.iteratees.GridFS
(Since version 0.19.0) Internal: will be private
Saves the content provided by the given enumerator with the given metadata.
Saves the content provided by the given enumerator with the given metadata.
Producer of content.
Metadata of the file to store.
Size of the chunks. Defaults to 256kB.
A future of a ReadFile[Id].
(Since version 0.17.0) Will be moved to reactivemongo.play.iteratees.GridFS
Saves the content provided by the given enumerator with the given metadata, with the MD5 computed.
Saves the content provided by the given enumerator with the given metadata, with the MD5 computed.
Producer of content.
Metadata of the file to store.
Size of the chunks. Defaults to 256kB.
A future of a ReadFile[Id].
(Since version 0.17.0) Will be moved to reactivemongo.play.iteratees.GridFS
A GridFS store.