I am facing the issue while downloading of azure blob file with old file being downloaded.Here are the steps.
While uploading.. following code is used.
BlobClient blobClient = containerClient.GetBlobClient(fileNamePrefix);
if (blobClient.Exists())
{
await blobClient.DeleteIfExistsAsync(DeleteSnapshotsOption.IncludeSnapshots);
await blobClient.UploadAsync(stream, true);
}
While above process works well, and in blob storage, i see updated file, if the same blob already existed.
After this is done, If i perform download operation.
BlobClient blobClient = containerClient.GetBlobClient(blobName);
await blobClient.DownloadToAsync(mstream);
I still see old file. So even though, new file exists in storage, the operation gives me old file.
It's baffling why it happening, but any idea's would be useful.
Thank you.