mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 22:21:23 +12:00
fixed #1252: Check is Dropbox account valid before do early url copy
This commit is contained in:
parent
8afd3bf9c5
commit
94c84ce430
|
@ -370,18 +370,18 @@ public DropboxContentInfo Move(string from_path, string to_path)
|
|||
|
||||
public override UploadResult Upload(Stream stream, string fileName)
|
||||
{
|
||||
if (!AutoCreateShareableLink)
|
||||
{
|
||||
CheckEarlyURLCopy(UploadPath, fileName);
|
||||
}
|
||||
CheckEarlyURLCopy(UploadPath, fileName);
|
||||
|
||||
return UploadFile(stream, UploadPath, fileName, AutoCreateShareableLink, ShareURLType);
|
||||
}
|
||||
|
||||
private void CheckEarlyURLCopy(string path, string fileName)
|
||||
{
|
||||
string url = GetPublicURL(URLHelpers.CombineURL(path, fileName));
|
||||
OnEarlyURLCopyRequested(url);
|
||||
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