public override UploadResult Upload(Stream stream, string fileName) { UploadResult result = UploadData(stream, "http://vgy.me/upload", fileName); if (result.IsSuccess) { VgymeResponse response = JsonConvert.DeserializeObject <VgymeResponse>(result.Response); if (response != null && !response.Error) { result.URL = response.Image; result.DeletionURL = response.Delete; } } return(result); }
public override UploadResult Upload(Stream stream, string fileName) { Dictionary <string, string> arguments = new Dictionary <string, string>(); if (!string.IsNullOrEmpty(UserKey)) { arguments.Add("userkey", UserKey); } UploadResult result = UploadData(stream, "https://vgy.me/upload", fileName, arguments: arguments); if (result.IsSuccess) { VgymeResponse response = JsonConvert.DeserializeObject <VgymeResponse>(result.Response); if (response != null && !response.Error) { result.URL = response.Image; result.DeletionURL = response.Delete; } } return(result); }