EarlyURLCopy FTP support

This commit is contained in:
Jaex 2015-12-09 20:38:57 +02:00
parent 3d1cc280c5
commit da4d03a6d4

View file

@ -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;
}