I have web service that point to sharepoint 2013 Office 365. I use the client object model. I am trying to update the xml file which stores 4 attachments in it. When I do thi
earlier i was using this approach and getting issues for 2MB file
var fileCreationInfo = new FileCreationInformation
{
Content = System.IO.File.ReadAllBytes(fileName),
Overwrite = true,
Url = Path.GetFileName(fileName)
};
I tried to use powershell script, as mentioned on many post, to increase the limit of file size but no luck, then i followed below approach and able to upload file size 100MB.
FileStream fs = new FileStream(fileName, FileMode.Open);
FileCreationInformation fileCreationInfo = new FileCreationInformation();
fileCreationInfo.ContentStream = fs;
fileCreationInfo.Url = Path.GetFileName(fileName);
fileCreationInfo.Overwrite = true;