Description Usage Arguments Value See Also Examples
Create a mongo.gridfs object used to access and store "grid files" on the MongoDB server.
1 | mongo.gridfs.create(mongo, db, prefix = "fs")
|
mongo |
A (mongo) connection object. |
db |
(string) The name of the database in which to access and/or store the gridfs-related collections. |
prefix |
(string) The prefix to use constructing the gridfs-related
collection names. There are two collections used for this purpose: |
(mongo.gridfs) An object to be used for subsequent operations on the grid file store.
mongo.gridfs,
mongo.gridfs.destroy
,
mongo.gridfs.store.file
,
mongo.gridfs.remove.file
,
mongo.gridfs.store
,
mongo.gridfile.writer.create
,
mongo.gridfs.find
, link{mongo.shorthand}
.
1 2 3 4 5 6 7 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
gridfs <- mongo.gridfs.create(mongo, "grid")
# Copy a local file to the server as a gridfs file
mongo.gridfs.store.file(gridfs, "tests/test.R", "test.R")
mongo.gridfs.destroy(gridfs)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.