Upload JSON Object as a File into OFfice 365 using JavaScript (JSOM)



In this post, I am going to show how to convert and upload a JSON Object into a SharePoint library using JavaScript Client Object Model.

That approach will be valid using the code inside a SharePoint Web Part, will not be valid for SP Apps or JavaScript applications running outside of SharePoint context.

Here you can see the code:


I tested it in Chrome 56 and Internet Explorer 11 and it worked.


If you want to upload other kind of documents (more that 2 MB). Then I recommend you take a look to this post: from my colleague Kev.

Please, feel free to write a comment if that is not working in your specific scenario!


Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Post Navigation