问题描述
我正在构建一个应用程序以通过 webdav 上传文件。上传工作正常,但我需要使用“textBox1.Text+textBox2.Text”创建一个目录,然后使用该新文件夹作为新的 BaseAddress 来上传文件。我目前拥有的代码仅创建文件夹,但我找不到“更改目录”的方法。提前感谢您的帮助!
var clientParams = new WebDavClientParams
{
BaseAddress = new Uri("https://myserver.com"),Credentials = new NetworkCredential("username","password")
};
using (var client = new WebDavClient(clientParams))
foreach (var file in files)
{
await client.Mkcol(textBox2.Text + textBox1.Text); // create a directory
await client.PutFile(Path.GetFileName(file),File.OpenRead(file)); // upload a resource
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)