Loading...
Searching...
No Matches
mongocxx::options::gridfs::upload Class Reference

`#include <mongocxx/v_noabi/mongocxx/options/gridfs/upload.hpp>`

## Description

Used by mongocxx::v_noabi::gridfs::bucket.

## Public Member Functions

| upload ()=default
| Default initialization.
| upload (v1::gridfs::upload_options opts)
| Construct with the mongocxx::v1 equivalent.
bsoncxx::v_noabi::stdx::optional< std::int32_t > const & | chunk_size_bytes () const
| Gets the chunk size of the GridFS file being uploaded.
upload & | chunk_size_bytes (std::int32_t chunk_size_bytes)
| Sets the chunk size of the GridFS file being uploaded. Defaults to the chunk size specified in options::gridfs::bucket.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | metadata () const
| Gets the metadata of the GridFS file being uploaded.
upload & | metadata (bsoncxx::v_noabi::document::view_or_value metadata)
| Sets the metadata field of the GridFS file being uploaded. A GridFS file can store arbitrary metadata in the form of a BSON document.
| operator v1::gridfs::upload_options () const
| Convert to the mongocxx::v1 equivalent.

## Constructor & Destructor Documentation

## upload() [1/2]

mongocxx::v_noabi::options::gridfs::upload::upload | ( |  | ) |

default

Default initialization.

## upload() [2/2]

mongocxx::v_noabi::options::gridfs::upload::upload | ( | v1::gridfs::upload_options | opts | ) |

Construct with the mongocxx::v1 equivalent.

## Member Function Documentation

## chunk_size_bytes() [1/2]

bsoncxx::v_noabi::stdx::optional< std::int32_t > const & mongocxx::v_noabi::options::gridfs::upload::chunk_size_bytes | ( |  | ) | const

inline

Gets the chunk size of the GridFS file being uploaded.

Returns
  The chunk size of the GridFS file being uploaded in bytes.

## chunk_size_bytes() [2/2]

upload & mongocxx::v_noabi::options::gridfs::upload::chunk_size_bytes | ( | std::int32_t | chunk_size_bytes | ) |

inline

Sets the chunk size of the GridFS file being uploaded. Defaults to the chunk size specified in options::gridfs::bucket.

Parameters

  chunk_size_bytes | The size of the chunks in bytes.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## metadata() [1/2]

bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & mongocxx::v_noabi::options::gridfs::upload::metadata | ( |  | ) | const

inline

Gets the metadata of the GridFS file being uploaded.

Returns
  The metadata document of the GridFS file.

## metadata() [2/2]

upload & mongocxx::v_noabi::options::gridfs::upload::metadata | ( | bsoncxx::v_noabi::document::view_or_value | metadata | ) |

inline

Sets the metadata field of the GridFS file being uploaded. A GridFS file can store arbitrary metadata in the form of a BSON document.

Parameters

  metadata | The metadata document for the GridFS file.

Returns
  A reference to the object on which this member function is being called. This facilitates method chaining.

## operator v1::gridfs::upload_options()

mongocxx::v_noabi::options::gridfs::upload::operator v1::gridfs::upload_options | ( |  | ) | const

inline explicit

Convert to the mongocxx::v1 equivalent.

The documentation for this class was generated from the following file:

- mongocxx/v_noabi/mongocxx/options/gridfs/upload.hpp