initiateNewMultipartUpload method
Initiate a new multipart upload.
Implementation
Future<String> initiateNewMultipartUpload(
String bucket,
String object,
Map<String, String>? metaData,
) async {
MinioInvalidBucketNameError.check(bucket);
MinioInvalidObjectNameError.check(object);
final resp = await _client.request(
method: 'POST',
bucket: bucket,
object: object,
headers: metaData,
resource: 'uploads',
);
validate(resp, expect: 200);
final node = xml.XmlDocument.parse(resp.body);
return node.findAllElements('UploadId').first.text;
}