azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[BUG]The result of SyncCopyFromUriAsync may be corrupted
Library name and version
Azure.Storage.Blobs 12.14.0
Describe the bug
We use SyncCopyFromUriAsync to copy head images from Wechat to our own azure blob. Sometimes the copied images are corrupted, losing some bytes at the end of file.
Expected behavior
Copied image should be integrated and same as the original ones.
Actual behavior
Sometimes,the copied images are corrupted,losing some bytes at the end of file.
For example,jpeg files lose EOI marker.
Reproduction Steps
public async Task<Uri> SyncCopyFromUriAsync(string containerName, string blobPath, Uri srcUri, string contentDisposition = "")
{
var blobClient = await this.GetBlobClientAsync(containerName, blobPath);
await blobClient.SyncCopyFromUriAsync(srcUri);
if (!string.IsNullOrWhiteSpace(contentDisposition))
{
var httpHeaders = new BlobHttpHeaders()
{
ContentDisposition = contentDisposition
};
await blobClient.SetHttpHeadersAsync(httpHeaders).ConfigureAwait(false);
}
return blobClient.Uri;
}
Environment
Docker in k8s with .NET runtimes installed: Microsoft.AspNetCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
IDE:VS2022 17.4.3
Thank you for your feedback. This has been routed to the support team for assistance.
@hitsjt Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.
Issue is being discussed internally with the Storage .Net Devs.
@hitsjt As discussed internally over email, please file an ICM and this issue would be looked further on that.