Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileCreationInformation newFile = new FileCreationInformation();
- newFile.Content = System.IO.File.ReadAllBytes(file.FileName);
- newFile.Url = Path.GetFileName(file.FileName);
- List docs = clientContext.Web.Lists.GetByTitle("List_Name");
- Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(newFile);
- clientContext.Load(uploadFile);
- clientContext.ExecuteQuery();
- FileCreationInformation newFile = new FileCreationInformation();
- newFile.Content = System.IO.File.ReadAllBytes(UserCV.FileName);
- newFile.Url = Path.GetFileName(UserCV.FileName);
- List docs = clientContext.Web.Lists.GetByTitle("List_Name");
- Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(newFile);
- clientContext.Load(uploadFile);
- clientContext.ExecuteQuery();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement