Forget to add SFTP early copy too

This commit is contained in:
Jaex 2015-12-09 20:45:55 +02:00
parent da4d03a6d4
commit 27e11743f8
2 changed files with 10 additions and 8 deletions

View file

@ -69,12 +69,19 @@ public override UploadResult Upload(Stream stream, string fileName)
string subFolderPath = Account.GetSubFolderPath(); string subFolderPath = Account.GetSubFolderPath();
string path = subFolderPath.CombineURL(fileName); string path = subFolderPath.CombineURL(fileName);
bool uploadResult; string url = Account.GetUriPath(fileName, subFolderPath);
OnEarlyURLCopyRequested(url);
try try
{ {
IsUploading = true; IsUploading = true;
uploadResult = UploadStream(stream, path); bool uploadResult = UploadStream(stream, path);
if (uploadResult && !StopUploadRequested && !IsError)
{
result.URL = url;
}
} }
finally finally
{ {
@ -82,11 +89,6 @@ public override UploadResult Upload(Stream stream, string fileName)
IsUploading = false; IsUploading = false;
} }
if (uploadResult && !StopUploadRequested && !IsError)
{
result.URL = Account.GetUriPath(fileName, subFolderPath);
}
return result; return result;
} }

View file

@ -421,7 +421,7 @@ public class TaskSettingsAdvanced
Editor("System.Windows.Forms.Design.StringCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] Editor("System.Windows.Forms.Design.StringCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public List<string> ImageExtensions { get; set; } public List<string> ImageExtensions { get; set; }
[Category("Upload"), DefaultValue(false), Description("Copy URL before start upload. Only works for FTP and Dropbox public URLs.")] [Category("Upload"), DefaultValue(false), Description("Copy URL before start upload. Only works for FTP, FTPS, SFTP and Dropbox public URLs.")]
public bool EarlyCopyURL { get; set; } public bool EarlyCopyURL { get; set; }
[Category("Upload"), Description("Files with these file extensions will be uploaded using text uploader."), [Category("Upload"), Description("Files with these file extensions will be uploaded using text uploader."),