Upload a file to SharePoint through the built-in web services

后端 未结 7 875
悲&欢浪女
悲&欢浪女 2020-11-27 03:37

What is the best way to upload a file to a Document Library on a SharePoint server through the built-in web services that version WSS 3.0 exposes?

Following

7条回答
  •  -上瘾入骨i
    2020-11-27 04:38

    Another option is to use plain ol' HTTP PUT:

    WebClient webclient = new WebClient();
    webclient.Credentials = new NetworkCredential(_userName, _password, _domain);
    webclient.UploadFile(remoteFileURL, "PUT", FilePath);
    webclient.Dispose();
    

    Where remoteFileURL points to your SharePoint document library...

提交回复
热议问题