Skip to content

Commit 97ee2b6

Browse files
committed
refactor
1 parent 9d74a46 commit 97ee2b6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ManagedCode.Storage.IntegrationTests/TestApp/Controllers/AzureTestController.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public async Task<Result<string>> UploadChunksUsingMerge([FromForm] FileUploadPa
6161
}
6262

6363
[HttpPost("upload-chunks-merge/complete")]
64-
public async Task<Result> UploadChunksUsingMergeComplete(uint fileCrc, List<string> blobNames, CancellationToken cancellationToken)
64+
public async Task<Result<BlobMetadata>> UploadChunksUsingMergeComplete(uint fileCrc, List<string> blobNames, CancellationToken cancellationToken)
6565
{
6666
using (var memoryStream = new MemoryStream())
6767
{
@@ -74,9 +74,16 @@ public async Task<Result> UploadChunksUsingMergeComplete(uint fileCrc, List<stri
7474
await memoryStream.CopyToAsync(stream, cancellationToken);
7575
}
7676
}
77+
78+
var result = await _storage.UploadAsync(memoryStream, cancellationToken: cancellationToken);
79+
80+
if (result.IsSuccess)
81+
{
82+
return Result.Succeed(result.Value);
83+
}
7784
}
7885

79-
return Result.Succeed();
86+
return Result.Fail();
8087
}
8188

8289
[HttpPost("upload-chunks-stream/complete")]

0 commit comments

Comments
 (0)