Returns a new GridFS file.
The following options are recognized as key-value pairs:
Option | Type |
---|---|
aliases | BSON document |
chunkSize | integer |
contentType | string |
filename | string |
md5 | string |
metadata | BSON document |
Returns a new GridFS file with the contents of a local file filename
. On error, returns nil
and the error message.
Drops gridfs
and returns true
. On error, returns nil
and the error message.
Finds all files in gridfs
that match query
and returns a GridFS file list.
Returns the first GridFS file in gridfs
that matches query
or nil
if nothing was found.
On error, returns nil
and the error message.
Returns the first GridFS file in gridfs
that matches filename
or nil
if nothing was found.
On error, returns nil
and the error message.
Returns a Collection handle that provides raw access to chunks of files in gridfs
.
Returns a Collection handle that provides raw access to file metadata in gridfs
.
Removes all files in gridfs
that match filename
and returns true
. On error, returns nil
and
the error message.