Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/miniocpp/args.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ struct PutObjectArgs : public PutObjectBaseArgs {
std::istream* stream = nullptr;
char* buf = nullptr;
std::optional<size_t> size;
unsigned int max_inflight_parts = 1;
http::ProgressFunction progressfunc = nullptr;
void* progress_userdata = nullptr;
#ifdef MINIO_CPP_RDMA
Expand Down
3 changes: 3 additions & 0 deletions src/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ PutObjectArgs::PutObjectArgs(std::istream& istream, long object_size,

error::Error PutObjectArgs::Validate() {
if (error::Error err = ObjectArgs::Validate()) return err;
if (max_inflight_parts == 0) {
return error::Error("max_inflight_parts must be greater than 0");
}
const bool has_stream = (stream != nullptr);
const bool has_buf = (buf != nullptr);
if (has_stream == has_buf) {
Expand Down
Loading
Loading