| 1955 | // Upload-related helpers |
| 1956 | |
| 1957 | Status CommitCurrentPart() { |
| 1958 | if (!IsMultipartCreated()) { |
| 1959 | RETURN_NOT_OK(CreateMultipartUpload()); |
| 1960 | } |
| 1961 | |
| 1962 | ARROW_ASSIGN_OR_RAISE(auto buf, current_part_->Finish()); |
| 1963 | current_part_.reset(); |
| 1964 | current_part_size_ = 0; |
| 1965 | return UploadPart(buf); |
| 1966 | } |
| 1967 | |
| 1968 | Status UploadUsingSingleRequest() { |
| 1969 | std::shared_ptr<Buffer> buf; |