using (FileStream fs = new FileStream(strCurrentTempPath, FileMode.Open)) { SP.File.SaveBinaryDirect(ClientContextName,ServerRelativeUrl, FileStream, true); }
Microsoft.SharePoint.Client.File file = oWeb.GetFileByServerRelativeUrl(ServerRelativeUrl); FileVersionCollection versions = file.Versions; FileSaveBinaryInformation fsbi = new FileSaveBinaryInformation(); ClientContext ctx = new ClientContext(RootUrl); byte[] binaryData =System.IO.File.ReadAllBytes(strCurrentTempPath); fsbi.Content = binaryData; file.SaveBinary(fsbi); clientContext.Load(file); clientContext.Load(versions); clientContext.ExecuteQuery();
<system.web> <httpruntime maxrequestlength="1000000" executiontimeout="240" requestvalidationmode="2.0" /> </system.web>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)