locked
ReadWrite Stream for Azure Storage RRS feed

  • Question

  • Does Azure Storage or Azure File provides ReadWrite Stream of a blob, without downloading the blob on a local machine memory or disk. There are some operation on Streams requires Stream with CanRead() and CanWrite() as true e.g. below example on Zip file stored as Azure blob and I would like to update a file inside a zip file.  Here Package.Open() expects an ReadWrite Stream

        using Microsoft.WindowsAzure.Storage;
        using Microsoft.WindowsAzure.Storage.Blob;
        using System.IO.Packaging;
        using Microsoft.WindowsAzure.Storage.File;
        using System.IO.Compression;

    using (Package package = Package.Open(zipFileStream, FileMode.Open, FileAccess.ReadWrite))
                {
                    PackagePart part = package.GetPart(new Uri(relativeFilePath, UriKind.Relative));
                    using (StreamWriter writer = new StreamWriter(part.GetStream()))
                    {
                        writer.Write(updateContent);
                        writer.Flush();
                    }
                }

    Friday, August 24, 2018 10:49 PM

All replies

  • Blob storage is optimized for storing massive amounts of unstructured data. There was no build in stream of blob to update files in zip.

    I would request you to submit an idea at Feedback.

    All of the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.

    • Proposed as answer by VeeraGiri Babu Tuesday, August 28, 2018 12:18 PM
    Saturday, August 25, 2018 5:19 AM