我有这个在SharePoint中创建文件夹的webdav代码:
HttpWebRequest request = (System.Net.HttpWebRequest)HttpWebRequest.Create(folderAddress);
request.Credentials = wsLists.Credentials; // CredentialCache.DefaultCredentials;
request.Method = "MKCOL";
response = (System.Net.HttpWebResponse)request.GetResponse();
response.Close();
如何立即更改代码以立即将文件上传到此新创建的文件夹。我认为这是一个通用的webdav问题,谢谢
答案 0 :(得分:3)
您应该可以使用WebClient.UploadFile
执行此操作另请参阅此问题以使用HttpRequest:webclient-upload-file-error