Loading...
Searching...
No Matches
mongocxx::v1::gridfs::upload_options Class Reference

`#include <mongocxx/v1/gridfs/upload_options.hpp>`

## Description

Options related to uploading a file to a GridFS bucket.

Supported fields include:

- chunk_size_bytes ("chunkSizeBytes")
- metadata ("metadata")

See also
  - GridFS (MongoDB Manual)

## Public Member Functions

| upload_options ()
| Default initialization.
| upload_options (upload_options &&other) noexcept
| Move constructor.
| upload_options (upload_options const &other)
| Copy construction.
| ~upload_options ()
| Destroy this object.
bsoncxx::v1::stdx::optional< std::int32_t > | chunk_size_bytes () const
| Return the current "chunkSizeBytes" field.
upload_options & | chunk_size_bytes (std::int32_t v)
| Set the "chunkSizeBytes" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > | metadata () const
| Return the current "metadata" field.
upload_options & | metadata (bsoncxx::v1::document::value v)
| Set the "metadata" field.
upload_options & | operator= (upload_options &&other) noexcept
| Move assignment.
upload_options & | operator= (upload_options const &other)
| Copy assignment.

## Constructor & Destructor Documentation

## ~upload_options()

mongocxx::v1::gridfs::upload_options::~upload_options | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## upload_options() [1/3]

mongocxx::v1::gridfs::upload_options::upload_options | ( | upload_options && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## upload_options() [2/3]

mongocxx::v1::gridfs::upload_options::upload_options | ( | upload_options const & | other | ) |

Copy construction.

## upload_options() [3/3]

mongocxx::v1::gridfs::upload_options::upload_options | ( |  | ) |

Default initialization.

Postconditions:
  - All supported fields are "unset" or zero-initialized.

## Member Function Documentation

## chunk_size_bytes() [1/2]

bsoncxx::v1::stdx::optional< std::int32_t > mongocxx::v1::gridfs::upload_options::chunk_size_bytes | ( |  | ) | const

Return the current "chunkSizeBytes" field.

## chunk_size_bytes() [2/2]

upload_options & mongocxx::v1::gridfs::upload_options::chunk_size_bytes | ( | std::int32_t | v | ) |

Set the "chunkSizeBytes" field.

## metadata() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::document::view > mongocxx::v1::gridfs::upload_options::metadata | ( |  | ) | const

Return the current "metadata" field.

## metadata() [2/2]

upload_options & mongocxx::v1::gridfs::upload_options::metadata | ( | bsoncxx::v1::document::value | v | ) |

Set the "metadata" field.

## operator=() [1/2]

upload_options & mongocxx::v1::gridfs::upload_options::operator= | ( | upload_options && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

upload_options & mongocxx::v1::gridfs::upload_options::operator= | ( | upload_options const & | other | ) |

Copy assignment.

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

- mongocxx/v1/gridfs/upload_options.hpp