Added title to Gfycat uploads otherwise not shows GIF preview on Discord

This commit is contained in:
Jaex 2020-12-03 04:16:31 +03:00
parent cf6d35bafe
commit b18fab5bc0

View file

@ -76,6 +76,7 @@ public class GfycatUploader : FileUploader, IOAuth2
public bool IgnoreExisting { get; set; } = true;
public bool Private { get; set; } = true;
public bool KeepAudio { get; set; } = true;
public string Title { get; set; } = "ShareX";
private const string URL_AUTHORIZE = "https://gfycat.com/oauth/authorize";
private const string URL_UPLOAD = "https://filedrop.gfycat.com";
@ -270,6 +271,7 @@ private GfycatCreateResponse CreateGfycat(NameValueCollection headers)
args.Add("noResize", NoResize);
args.Add("noMd5", IgnoreExisting);
args.Add("keepAudio", KeepAudio);
args.Add("title", Title);
string json = JsonConvert.SerializeObject(args);