I am stuck with the problem and not able to fix the issue .I am trying to upload files greater than 250 MB in SharePoint Online using SharePoint Online CSOM API.I get the following exception:
The request message is too big. The server does not allow messages larger than 262144000 bytes.
and through web portal I am able to upload files greater than 250 MB.
Here is the list of the things i did in CSOM call:
File spFile=null;
using (FileStream stream = new FileStream(filepath, FileMode.Open)) { FileSaveBinaryInformation fsbi = new FileSaveBinaryInformation(); spFile = clientContext.Web.GetFileByServerRelativeUrl("/sites/../a.txt"); fsbi.ContentStream = stream; spFile.SaveBinary(fsbi); clientContext.Load(spFile); clientContext.ExecuteQuery(); }
Second Question :- Is there any way to increase the File upload limit in SharePoint Online??