Skip to main content

gridfs

5 configuration options · available in Rust, Python, Node.js, Java

Quick start
use opendal::Operator;

let op = Operator::via_iter("gridfs", [
])?;
All configuration options (copy & trim)
Full reference
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.

Configuration reference

General5
KeyTypeRequiredDescription
connection_stringstringnoThe connection string of the MongoDB service.
databasestringnoThe database name of the MongoDB GridFs service to read/write.
bucketstringnoThe bucket name of the MongoDB GridFs service to read/write.
chunk_sizeintegernoThe chunk size of the MongoDB GridFs service used to break the user file into chunks.
rootstringnoThe working directory, all operations will be performed under it.