mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 04:06:05 +13:00
fixed #1252: Check is Dropbox account valid before do early url copy
This commit is contained in:
parent
8afd3bf9c5
commit
94c84ce430
1 changed files with 6 additions and 6 deletions
|
@ -369,20 +369,20 @@ public DropboxContentInfo Move(string from_path, string to_path)
|
|||
#endregion File operations
|
||||
|
||||
public override UploadResult Upload(Stream stream, string fileName)
|
||||
{
|
||||
if (!AutoCreateShareableLink)
|
||||
{
|
||||
CheckEarlyURLCopy(UploadPath, fileName);
|
||||
}
|
||||
|
||||
return UploadFile(stream, UploadPath, fileName, AutoCreateShareableLink, ShareURLType);
|
||||
}
|
||||
|
||||
private void CheckEarlyURLCopy(string path, string fileName)
|
||||
{
|
||||
if (OAuth2Info.CheckOAuth(AuthInfo) && !AutoCreateShareableLink)
|
||||
{
|
||||
string url = GetPublicURL(URLHelpers.CombineURL(path, fileName));
|
||||
OnEarlyURLCopyRequested(url);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetPublicURL(string path)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue