forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ACR UploadBlob method to upload a blob in chunks (Azure#32059)
* added Size to UploadBlobResult * Add test for pull and record tests * first pass on chunked upload; plus basic large file upload test * compute digest in chunks * fix bugs * refactor and export API * re-record failing tests * add sync tests * EOD WIP * bug fix - incr chunk count * small refactor of Content-Range header * don't compute digest 2x; validate chunkLength input * refactor to not seek streams we don't own * validate digest on blob upload and add tests for blob and manifest uploads on non-seekable streams * re-record tests for new chunked-upload approach and add recordings for new tests. * fix failing tests * don't allocate a large buffer to upload a small chunk, and PR fb. * re-record failing tests * fix missed config * missed test
- Loading branch information
1 parent
85d9b88
commit 3467605
Showing
37 changed files
with
21,329 additions
and
2,451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Blob/ChunkedUploadResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Azure.Containers.ContainerRegistry.Specialized | ||
{ | ||
internal class ChunkedUploadResult | ||
{ | ||
public ChunkedUploadResult(string digest, string location, long size) | ||
{ | ||
Digest = digest; | ||
Location = location; | ||
Size = size; | ||
} | ||
|
||
public string Digest { get; } | ||
|
||
public string Location { get; } | ||
|
||
public long Size { get; } | ||
} | ||
} |
Oops, something went wrong.