Blog

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

image

Hi,

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.

IMPORTANT:

If you want to upload other kind of documents (more that 2 MB). Then I recommend you take a look to this post: http://sharepointcookies.com/2017/02/programmatically-uploading-large-files-client-side-to-sharepoint-2013/ from my colleague Kev.

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

@jquintozamora

One Thought on “Upload JSON Object as a File into OFfice 365 using JavaScript (JSOM)

  1. Pingback: TypeScript functions to convert from Base64 to UTF8 and vice versa - José Quinto

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

Post Navigation