Ejemplo n.º 1
0
        public async Task AbortIncompleteUpload()
        {
            string resourceName = nameof(AbortIncompleteUpload);

            InitiateMultipartUploadResponse initResp = await ObjectClient.InitiateMultipartUploadAsync(BucketName, resourceName).ConfigureAwait(false);

            Assert.Equal(BucketName, initResp.Bucket);
            Assert.Equal(resourceName, initResp.Key);
            Assert.NotNull(initResp.UploadId);

            AbortMultipartUploadResponse abortResp = await ObjectClient.AbortMultipartUploadAsync(BucketName, resourceName, initResp.UploadId).ConfigureAwait(false);

            Assert.True(abortResp.IsSuccess);
            Assert.Equal(204, abortResp.StatusCode);
        }