OCISDK/OCISDK/ObjectStorage/ObjectStorageClientAsync.cs
/// <summary>
/// Lists all of the in-progress multipart uploads for the given bucket in the given Object Storage namespace.
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Lists all of the in-progress multipart uploads for the given bucket in the given Object Storage namespace.
Lists all of the in - progress multipart uploads for the given bucket in the given Object Storage namespace .
public async Task<ListMultipartUploadsResponse> ListMultipartUploads(ListMultipartUploadsRequest request)
        {
            var uriStr = $"{GetEndPointNoneVersion(ObjectStorageServices.Bucket(request.NamespaceName, request.BucketName), this.Region)}/u";
            var optional = request.GetOptionQuery();
            if (!string.IsNullOrEmpty(optional))
            {
                uriStr = $"{uriStr}?{optional}";
            }
            var uri = new Uri(uriStr);
            using (var webResponse = await this.RestClientAsync.Get(uri, new HttpRequestHeaderParam { OpcClientRequestId = request.OpcClientRequestId }))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new ListMultipartUploadsResponse()
                {
                    Items = JsonSerializer.Deserialize<List<MultipartUploadDetails>>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    OpcClientRequestId = webResponse.Headers.Get("opc-client-request-id"),
                    OpcNextPage = webResponse.Headers.Get("opc-next-page")
                };
            }
        }
public async Task < ListMultipartUploadsResponse > ListMultipartUploads ( ListMultipartUploadsRequest request ) { var uriStr = $" { GetEndPointNoneVersion ( ObjectStorageServices . Bucket ( request . NamespaceName , request . BucketName ) , this . Region ) } /u " ; var optional = request . GetOptionQuery ( ) ; if ( ! string . IsNullOrEmpty ( optional ) ) { uriStr = $" { uriStr } ? { optional } " ; } var uri = new Uri ( uriStr ) ; using ( var webResponse = await this . RestClientAsync . Get ( uri , new HttpRequestHeaderParam { OpcClientRequestId = request . OpcClientRequestId } ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new ListMultipartUploadsResponse ( ) { Items = JsonSerializer . Deserialize < List < MultipartUploadDetails > > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , OpcClientRequestId = webResponse . Headers . Get ( " " ) , OpcNextPage = webResponse . Headers . Get ( " " ) } ; } }
Lists all of the in-progress multipart uploads for the given bucket in the given Object Storage namespace.
Lists all of the in - progress multipart uploads for the given bucket in the given Object Storage namespace .
None
request
ListMultipartUploadsRequest
None