This service can be used to:
root: Set the working directory of OpenDALconnection_string: Set the connection string of mongodb serverdatabase: Set the database of mongodbbucket: Set the bucket of mongodb gridfschunk_size: Set the chunk size of mongodb gridfsuse opendal_core::Operator; use opendal_core::Result; use opendal_service_gridfs::Gridfs; #[tokio::main] async fn main() -> Result<()> { let mut builder = Gridfs::default() .root("/") .connection_string("mongodb://myUser:myPassword@localhost:27017/myAuthDB") .database("your_database") .bucket("your_bucket") // The chunk size in bytes used to break the user file into chunks. .chunk_size(255); let op = Operator::new(builder)?.finish(); Ok(()) }