5 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("gridfs", [
])?;
use opendal::Operator;
let op = Operator::via_iter("gridfs", [
// The connection string of the MongoDB service.
// ("connection_string".to_string(), "...".to_string()),
// The database name of the MongoDB GridFs service to read/write.
// ("database".to_string(), "...".to_string()),
// The bucket name of the MongoDB GridFs service to read/write.
// ("bucket".to_string(), "...".to_string()),
// The chunk size of the MongoDB GridFs service used to break the user file into chunks.
// ("chunk_size".to_string(), "1000".to_string()),
// The working directory, all operations will be performed under it.
// ("root".to_string(), "...".to_string()),
])?;
Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.
| Key | Type | Required | Description |
|---|---|---|---|
connection_string | string | no | The connection string of the MongoDB service. |
database | string | no | The database name of the MongoDB GridFs service to read/write. |
bucket | string | no | The bucket name of the MongoDB GridFs service to read/write. |
chunk_size | integer | no | The chunk size of the MongoDB GridFs service used to break the user file into chunks. |
root | string | no | The working directory, all operations will be performed under it. |