This commit is contained in:
xpnas 2022-01-08 01:24:39 +08:00
parent ffa9e77c81
commit cc784cdd38
2 changed files with 5 additions and 5 deletions

View File

@ -49,9 +49,6 @@ namespace Inotify.Controllers
sendTemplate.IsActive = sendAuthInfo.Active;
sendTemplate.AuthToTemplate(sendAuthInfo.AuthData);
userSendTemplates.Add(sendTemplate);
}
if (barkTemplateAttribute.Key == sendTemplate.Type)
{
sendTemplate.Values.FirstOrDefault(e => e.Name == nameof(BarkSendTemplate.Auth.SendUrl)).Value = "";
}
}

View File

@ -237,8 +237,11 @@ namespace Inotify.Sends
{
if (IsUrl(url) && IsImage(url))
{
WebClient mywebclient = new WebClient();
return mywebclient.DownloadData(url);
using (WebClient mywebclient = new WebClient())
{
return mywebclient.DownloadData(url);
}
}
return null;
}