Hello anonymous user,
Thanks for the question and using MS Q&A platform.
From your question I'm understanding that you would like to append the XML Data to a single file rather than overwriting.
You could make use of Append Blobs in place of Block Blobs.
Referring this link
Step 1 :
To create AppendBlob - You will have to invoke a PUT
request with the header x-ms-blob-type = AppendBlob
with content length = 0 . This is a one time process.
Note : You could either create it manually or dynamically check whether the blob exist, if not create a AppendBlob with 0 content length.
**Step 2: **
Once the blob has been created you can append the data- by making use of the below endpoint. (Reference)
https://storagename.blob.core.windows.net/container/directory/filename.xml?comp=appendblock
Again, you will have to pass the header x-ms-blob-type = AppendBlob
in addition to other headers(like x-ms-version etc) .
Output :
At my end, I tried appending the same XML data twice.
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on or upvote button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators