mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Imgur check account type before refresh
This commit is contained in:
parent
223d6938ba
commit
6a162fa46c
1 changed files with 2 additions and 1 deletions
|
@ -272,7 +272,8 @@ private UploadResult InternalUpload(Stream stream, string fileName, bool refresh
|
|||
|
||||
if (errorData != null)
|
||||
{
|
||||
if (refreshTokenOnError && errorData.error.Equals("The access token provided is invalid.", StringComparison.InvariantCultureIgnoreCase) && RefreshAccessToken())
|
||||
if (UploadMethod == AccountType.User && refreshTokenOnError &&
|
||||
errorData.error.Equals("The access token provided is invalid.", StringComparison.InvariantCultureIgnoreCase) && RefreshAccessToken())
|
||||
{
|
||||
DebugHelper.WriteLine("Imgur access token refreshed, reuploading image.");
|
||||
|
||||
|
|
Loading…
Reference in a new issue