Added early copy URL support for Amazon S3

This commit is contained in:
Jaex 2019-01-27 22:59:15 +03:00
parent e196183099
commit 4fcb1dd358
2 changed files with 5 additions and 2 deletions

View file

@ -133,6 +133,9 @@ public override UploadResult Upload(Stream stream, string fileName)
}
string uploadPath = GetUploadPath(fileName);
string resultURL = GenerateURL(uploadPath);
OnEarlyURLCopyRequested(resultURL);
NameValueCollection headers = new NameValueCollection
{
@ -198,7 +201,7 @@ public override UploadResult Upload(Stream stream, string fileName)
return new UploadResult
{
IsSuccess = true,
URL = GenerateURL(uploadPath)
URL = resultURL
};
}
}

View file

@ -455,7 +455,7 @@ public class TaskSettingsAdvanced
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; }
[Category("Upload"), DefaultValue(false), Description("Copy URL before start upload. Only works for FTP, FTPS, SFTP, Dropbox, and Google Cloud Storage.")]
[Category("Upload"), DefaultValue(false), Description("Copy URL before start upload. Only works for FTP, FTPS, SFTP, Amazon S3 and Google Cloud Storage.")]
public bool EarlyCopyURL { get; set; }
[Category("Upload"), Description("Files with these file extensions will be uploaded using text uploader."),