fixed #1252: Check is Dropbox account valid before do early url copy

This commit is contained in:
Jaex 2016-01-20 14:18:34 +02:00
parent 8afd3bf9c5
commit 94c84ce430

View file

@ -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)