Commit 3b36f56b authored by tr's avatar tr

图片分离优化

parent 590bfc72
......@@ -313,6 +313,8 @@ namespace Tools.MyUtils
{
var url = $"{this.BaseUrl}/PrepareUpload.aspx";
using (var web = new WebClient())
{
try
{
web.Proxy = null;
web.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
......@@ -322,6 +324,10 @@ namespace Tools.MyUtils
var content = Encoding.UTF8.GetString(bytes);
return content == "1";
}
catch (Exception) { /*未请求到主机*/ }
return false;
}
}
/// <summary>
/// 下载成字节数组
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment