Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SP.File file = clientContext.Web.GetFileByServerRelativeUrl(SpCommonCOM.toRelative(path));
- clientContext.ExecuteQuery();
- FileSaveBinaryInformation fsi = new FileSaveBinaryInformation();
- byte[] raw = new byte[docLen];
- doc.Read(raw, 0, docLen);
- fsi.Content = raw;
- file.SaveBinary(fsi);
- if (revOpt.Equals("1"))
- file.CheckIn(comment, CheckinType.MajorCheckIn);
- if (revOpt.Equals("2"))
- file.CheckIn(comment, CheckinType.MinorCheckIn);
- if (revOpt.Equals("3"))
- file.CheckIn(comment, CheckinType.OverwriteCheckIn);
- clientContext.ExecuteQuery();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement