问题描述
我想下载视频文件并将其保存到项目文件夹中。 这是我当前的视频下载代码,并将其保存到文件夹中。
string savePath = Server.MapPath("DownloadedClip/Record1.mp4");
//Delete existing file
if (File.Exists(savePath))
{
File.Delete(savePath);
}
//Create a new file
using (File.Create(savePath)) //Exception Occur here
{
using (WebClient wc = new WebClient())
wc.DownloadFile(url,savePath);
}
当我运行项目时,它将引发异常,例如“找不到路径的一部分”。 我该如何解决这个问题?
感谢您的帮助。
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)