Save generated .xml file to Azure, using javascript

Regular Contributor

I have some client site javascript which creates an .xml structure. This works fine. Now I want to save this as a file to an Azure server.


Is this possible (as I am using client site scripting)? What might be the best approach?


Thanks, Mike

1 Reply
best response confirmed by Mike Jansen (Regular Contributor)

Hi Mike,


Long time no see...


Assuming you want to use Azure File Service, you could use REST operations with jQuery Ajax or fetch (browser native or polyfill).


See for the HTTP request format and required headers. In the case of saving a file it is a two step process: 

- Create File;

- Put Range.

BTW it looks like the API description for Put Range is incomplete, because you would expect that the actual contents should be specified in the HTTP body.


There is a security tradeoff however. You have to create a shared access signature with a shared key and that key is visible when you only use client side scripting. See for more information.