mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
cleanup & small fixes. Added some more IBinaryContainer implementations which are used by plugins which aren't rolled out yet. (but I didn't want to loose the code)
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2524 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
623fa983c3
commit
b7b89ade04
7 changed files with 167 additions and 38 deletions
|
@ -66,10 +66,12 @@ namespace GreenshotDropboxPlugin {
|
|||
// Try to get a URL to the uploaded image
|
||||
try {
|
||||
string responseString = oAuth.MakeOAuthRequest(HTTPMethod.GET, "https://api.dropbox.com/1/shares/sandbox/" + OAuthSession.UrlEncode3986(filename), null, null, null);
|
||||
LOG.DebugFormat("Parsing output: {0}", responseString);
|
||||
IDictionary<string, object> returnValues = JSONHelper.JsonDecode(responseString);
|
||||
if (returnValues.ContainsKey("url")) {
|
||||
return returnValues["url"] as string;
|
||||
if (responseString != null) {
|
||||
LOG.DebugFormat("Parsing output: {0}", responseString);
|
||||
IDictionary<string, object> returnValues = JSONHelper.JsonDecode(responseString);
|
||||
if (returnValues.ContainsKey("url")) {
|
||||
return returnValues["url"] as string;
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LOG.Error("Can't parse response.", ex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue