to the html I was using for the CEWP fixed the problem for me
The below code (file upload through REST API) can be used to upload multiple files to list item attachment.
First we are creating the new item in the list and then attaching the files.
var getFileBuffer = function(file)
var deferred = $.Deferred();
var reader = new FileReader();
reader.onload = function(e)
There are 2 ways to connect with SharePoint Online using CSOM C#.
Using Username and Password
Using App only authentication
Both the approaches require the Microsoft.SharePointOnline.CSOM NuGet installed.
Using username and password, you can connect to SharePoint Online using the below code.
public void GenerateContext()