I am having requirement of uploading files to sharepoint using managed client om.for that i tried the code like:
byte[] vercontent = webclient.DownloadData(curverFileVerUrl); double length; length = vercontent.Length; fileSize = ((length) / 1024).ToString(); FileCreationInformation crtinfo = new FileCreationInformation(); crtinfo.Content = vercontent; crtinfo.Url = DstDocLib.ServerRelativeUrl + "/" + subfile.Name; crtinfo.Overwrite = true; newFile = DstDocLib.Files.Add(crtinfo); contextDst.Load(newFile);

0 commentaires:
Enregistrer un commentaire