mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
EarlyURLCopy FTP support
This commit is contained in:
parent
3d1cc280c5
commit
da4d03a6d4
1 changed files with 9 additions and 7 deletions
|
@ -111,12 +111,19 @@ public override UploadResult Upload(Stream stream, string fileName)
|
|||
|
||||
string subFolderPath = Account.GetSubFolderPath(null, NameParserType.FolderPath);
|
||||
string path = subFolderPath.CombineURL(fileName);
|
||||
bool uploadResult;
|
||||
string url = Account.GetUriPath(fileName, subFolderPath);
|
||||
|
||||
OnEarlyURLCopyRequested(url);
|
||||
|
||||
try
|
||||
{
|
||||
IsUploading = true;
|
||||
uploadResult = UploadData(stream, path);
|
||||
bool uploadResult = UploadData(stream, path);
|
||||
|
||||
if (uploadResult && !StopUploadRequested && !IsError)
|
||||
{
|
||||
result.URL = url;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -124,11 +131,6 @@ public override UploadResult Upload(Stream stream, string fileName)
|
|||
IsUploading = false;
|
||||
}
|
||||
|
||||
if (uploadResult && !StopUploadRequested && !IsError)
|
||||
{
|
||||
result.URL = Account.GetUriPath(fileName, subFolderPath);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue