mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Support new URL response
This commit is contained in:
parent
887d8aea29
commit
15229df8ca
1 changed files with 9 additions and 1 deletions
|
@ -60,7 +60,14 @@ public override UploadResult ShortenURL(string url)
|
|||
|
||||
if (jsonResponse != null)
|
||||
{
|
||||
result.ShortenedURL = URLHelpers.CombineURL("https://zws.im", jsonResponse.Short);
|
||||
if (!string.IsNullOrEmpty(jsonResponse.URL))
|
||||
{
|
||||
result.ShortenedURL = jsonResponse.URL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.ShortenedURL = URLHelpers.CombineURL("https://zws.im", jsonResponse.Short);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,5 +78,6 @@ public override UploadResult ShortenURL(string url)
|
|||
public class ZeroWidthURLShortenerResponse
|
||||
{
|
||||
public string Short { get; set; }
|
||||
public string URL { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue