Added Amazon S3 file uploader support.

This commit is contained in:
Alan Edwardes 2014-03-26 16:56:05 +00:00
parent c980df483d
commit 8744352d01
12 changed files with 616 additions and 183 deletions

View file

@ -840,6 +840,9 @@ public UploadResult UploadFile(Stream stream, string fileName)
case FileDestination.Mega:
fileUploader = new Mega(Program.UploadersConfig.MegaAuthInfos, Program.UploadersConfig.MegaParentNodeId);
break;
case FileDestination.AmazonS3:
fileUploader = new AmazonS3(Program.UploadersConfig.AmazonS3Settings);
break;
}
if (fileUploader != null)

View file

@ -84,6 +84,8 @@ public enum TextDestination
[Description("File uploaders"), DefaultValue(FileDestination.Dropbox)]
public enum FileDestination
{
[Description("Amazon S3")]
AmazonS3,
[Description("dropbox.com")]
Dropbox,
[Description("FTP Server")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,159 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (C) 2008-2014 ShareX Developers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using HelpersLib;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System;
using System.Text.RegularExpressions;
using UploadersLib.HelperClasses;
using System.Security.Cryptography;
using System.Linq;
namespace UploadersLib.FileUploaders
{
public sealed class AmazonS3 : FileUploader
{
const string FILE_INPUT_NAME = "file";
public AmazonS3Settings AccessKeys { get; set; }
public AmazonS3(AmazonS3Settings accessKeys)
{
AccessKeys = accessKeys;
}
private string GetObjectStorageClass()
{
return AccessKeys.UseReducedRedundancyStorage ? "REDUCED_REDUNDANCY" : "STANDARD";
}
private string GetObjectKey(string fileName)
{
var parser = new NameParser(NameParserType.FileName);
return string.Format("{0}{1}", parser.Parse(AccessKeys.ObjectPrefix), fileName);
}
private string GetPolicyDocument(string fileName)
{
var mimeType = Helpers.GetMimeType(fileName);
var objectKey = GetObjectKey(fileName);
var objectStorageClass = GetObjectStorageClass();
var policyDocument = string.Format(@"{{
'expiration': '2015-12-01T12:00:00.000Z',
'conditions': [
{{'acl': 'public-read' }},
{{'bucket': '{0}' }},
{{'Content-Type': '{1}'}},
{{'key': '{2}'}},
{{'x-amz-storage-class': '{3}'}},
]
}}", AccessKeys.Bucket, mimeType, objectKey, objectStorageClass);
return Regex.Replace(policyDocument, @"\s", "");
}
private string GetEndpoint()
{
return string.Format("{0}{1}", AccessKeys.Endpoint, AccessKeys.Bucket);
}
// http://codeonaboat.wordpress.com/2011/04/22/uploading-a-file-to-amazon-s3-using-an-asp-net-mvc-application-directly-from-the-users-browser/
private string CreateSignature(string secretKey, byte[] policyBytes)
{
var encoding = new ASCIIEncoding();
var base64Policy = Convert.ToBase64String(policyBytes);
var secretKeyBytes = encoding.GetBytes(secretKey);
var hmacsha1 = new HMACSHA1(secretKeyBytes);
var base64PolicyBytes = encoding.GetBytes(base64Policy);
var signatureBytes = hmacsha1.ComputeHash(base64PolicyBytes);
return Convert.ToBase64String(signatureBytes);
}
private Dictionary<string, string> GetParameters(string fileName, string objectKey)
{
var policyDocument = GetPolicyDocument(fileName);
var policyBytes = Encoding.ASCII.GetBytes(policyDocument);
var signature = CreateSignature(AccessKeys.SecretAccessKey, policyBytes);
var parameters = new Dictionary<string, string>();
parameters.Add("key", objectKey);
parameters.Add("acl", "public-read");
parameters.Add("content-type", Helpers.GetMimeType(fileName));
parameters.Add("AWSAccessKeyId", AccessKeys.AccessKeyID);
parameters.Add("policy", Convert.ToBase64String(policyBytes));
parameters.Add("signature", signature);
parameters.Add("x-amz-storage-class", GetObjectStorageClass());
return parameters;
}
public override UploadResult Upload(Stream stream, string fileName)
{
if (string.IsNullOrEmpty(AccessKeys.AccessKeyID)) throw new Exception("'Access Key' must not be empty.");
if (string.IsNullOrEmpty(AccessKeys.SecretAccessKey)) throw new Exception("'Secret Access Key' must not be empty.");
if (string.IsNullOrEmpty(AccessKeys.Endpoint)) throw new Exception("'Endpoint' must not be emoty.");
if (string.IsNullOrEmpty(AccessKeys.Bucket)) throw new Exception("'Bucket' must not be empty.");
var objectKey = GetObjectKey(fileName);
var uploadResult = UploadData(stream, GetEndpoint(), fileName, FILE_INPUT_NAME, GetParameters(fileName, objectKey), null, null, ResponseType.Headers);
if (uploadResult.IsSuccess)
{
if (AccessKeys.UseCustomCNAME)
{
uploadResult.URL = string.Format("http://{0}/{1}", AccessKeys.Bucket, objectKey);
}
else
{
uploadResult.URL = string.Format("{0}/{1}", GetEndpoint(), objectKey);
}
}
return uploadResult;
}
}
public class AmazonS3Settings
{
public string AccessKeyID { get; set; }
public string SecretAccessKey { get; set; }
public bool UseReducedRedundancyStorage { get; set; }
public bool UseCustomCNAME { get; set; }
public string ObjectPrefix { get; set; }
public string Bucket { get; set; }
public string Endpoint { get; set; }
}
public class AmazonS3Region
{
public string Name { get; set; }
public string Endpoint { get; set; }
}
}

View file

@ -34,6 +34,7 @@ private void InitializeComponent()
this.tpImageUploaders = new System.Windows.Forms.TabPage();
this.tcImageUploaders = new System.Windows.Forms.TabControl();
this.tpImgur = new System.Windows.Forms.TabPage();
this.oauth2Imgur = new UploadersLib.GUI.OAuth2Control();
this.txtImgurAlbumID = new System.Windows.Forms.TextBox();
this.lblImgurAlbumID = new System.Windows.Forms.Label();
this.lvImgurAlbumList = new System.Windows.Forms.ListView();
@ -43,7 +44,9 @@ private void InitializeComponent()
this.btnImgurRefreshAlbumList = new System.Windows.Forms.Button();
this.cbImgurThumbnailType = new System.Windows.Forms.ComboBox();
this.lblImgurThumbnailType = new System.Windows.Forms.Label();
this.atcImgurAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpImageShack = new System.Windows.Forms.TabPage();
this.atcImageShackAccountType = new UploadersLib.GUI.AccountTypeControl();
this.btnImageShackLogin = new System.Windows.Forms.Button();
this.btnImageShackOpenPublicProfile = new System.Windows.Forms.Button();
this.cbImageShackIsPublic = new System.Windows.Forms.CheckBox();
@ -53,6 +56,7 @@ private void InitializeComponent()
this.txtImageShackPassword = new System.Windows.Forms.TextBox();
this.lblImageShackPassword = new System.Windows.Forms.Label();
this.tpTinyPic = new System.Windows.Forms.TabPage();
this.atcTinyPicAccountType = new UploadersLib.GUI.AccountTypeControl();
this.btnTinyPicLogin = new System.Windows.Forms.Button();
this.txtTinyPicPassword = new System.Windows.Forms.TextBox();
this.lblTinyPicPassword = new System.Windows.Forms.Label();
@ -105,6 +109,7 @@ private void InitializeComponent()
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btnPicasaRefreshAlbumList = new System.Windows.Forms.Button();
this.oauth2Picasa = new UploadersLib.GUI.OAuth2Control();
this.tpTextUploaders = new System.Windows.Forms.TabPage();
this.tcTextUploaders = new System.Windows.Forms.TabControl();
this.tpPastebin = new System.Windows.Forms.TabPage();
@ -115,6 +120,8 @@ private void InitializeComponent()
this.txtPaste_eeUserAPIKey = new System.Windows.Forms.TextBox();
this.tpGist = new System.Windows.Forms.TabPage();
this.chkGistPublishPublic = new System.Windows.Forms.CheckBox();
this.oAuth2Gist = new UploadersLib.GUI.OAuth2Control();
this.atcGistAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpUpaste = new System.Windows.Forms.TabPage();
this.cbUpasteIsPublic = new System.Windows.Forms.CheckBox();
this.lblUpasteUserKey = new System.Windows.Forms.Label();
@ -139,6 +146,7 @@ private void InitializeComponent()
this.btnFtpClient = new System.Windows.Forms.Button();
this.btnFTPExport = new System.Windows.Forms.Button();
this.btnFTPImport = new System.Windows.Forms.Button();
this.ucFTPAccounts = new UploadersLib.AccountsControl();
this.gbFtpSettings = new System.Windows.Forms.GroupBox();
this.lblFtpFiles = new System.Windows.Forms.Label();
this.lblFtpText = new System.Windows.Forms.Label();
@ -161,6 +169,7 @@ private void InitializeComponent()
this.lblMegaStatusTitle = new System.Windows.Forms.Label();
this.tpGoogleDrive = new System.Windows.Forms.TabPage();
this.cbGoogleDriveIsPublic = new System.Windows.Forms.CheckBox();
this.oauth2GoogleDrive = new UploadersLib.GUI.OAuth2Control();
this.tpBox = new System.Windows.Forms.TabPage();
this.txtBoxFolderID = new System.Windows.Forms.TextBox();
this.lblBoxFolderID = new System.Windows.Forms.Label();
@ -183,6 +192,7 @@ private void InitializeComponent()
this.lblSendSpaceUsername = new System.Windows.Forms.Label();
this.txtSendSpacePassword = new System.Windows.Forms.TextBox();
this.txtSendSpaceUserName = new System.Windows.Forms.TextBox();
this.atcSendSpaceAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpGe_tt = new System.Windows.Forms.TabPage();
this.lblGe_ttAccessToken = new System.Windows.Forms.Label();
this.lblGe_ttPassword = new System.Windows.Forms.Label();
@ -203,6 +213,7 @@ private void InitializeComponent()
this.txtJiraConfigHelp = new System.Windows.Forms.TextBox();
this.txtJiraHost = new System.Windows.Forms.TextBox();
this.lblJiraHost = new System.Windows.Forms.Label();
this.oAuthJira = new UploadersLib.GUI.OAuth2Control();
this.tpMinus = new System.Windows.Forms.TabPage();
this.lblMinusURLType = new System.Windows.Forms.Label();
this.cbMinusURLType = new System.Windows.Forms.ComboBox();
@ -237,6 +248,7 @@ private void InitializeComponent()
this.txtEmailDefaultSubject = new System.Windows.Forms.TextBox();
this.tpSharedFolder = new System.Windows.Forms.TabPage();
this.tlpSharedFolders = new System.Windows.Forms.TableLayoutPanel();
this.ucLocalhostAccounts = new UploadersLib.AccountsControl();
this.gbSharedFolder = new System.Windows.Forms.GroupBox();
this.lblSharedFolderFiles = new System.Windows.Forms.Label();
this.lblSharedFolderText = new System.Windows.Forms.Label();
@ -244,10 +256,25 @@ private void InitializeComponent()
this.cboSharedFolderFiles = new System.Windows.Forms.ComboBox();
this.cboSharedFolderText = new System.Windows.Forms.ComboBox();
this.cboSharedFolderImages = new System.Windows.Forms.ComboBox();
this.tpAmazonS3 = new System.Windows.Forms.TabPage();
this.cbAmazonS3Endpoint = new System.Windows.Forms.ComboBox();
this.lblAmazonS3BucketName = new System.Windows.Forms.Label();
this.txtAmazonS3BucketName = new System.Windows.Forms.TextBox();
this.lblAmazonS3Endpoint = new System.Windows.Forms.Label();
this.txtAmazonS3ObjectPrefix = new System.Windows.Forms.TextBox();
this.lblAmazonS3ObjectPrefix = new System.Windows.Forms.Label();
this.cbAmazonS3UseRRS = new System.Windows.Forms.CheckBox();
this.txtAmazonS3SecretKey = new System.Windows.Forms.TextBox();
this.lblAmazonS3SecretKey = new System.Windows.Forms.Label();
this.lblAmazonS3AccessKey = new System.Windows.Forms.Label();
this.txtAmazonS3AccessKey = new System.Windows.Forms.TextBox();
this.tpURLShorteners = new System.Windows.Forms.TabPage();
this.tcURLShorteners = new System.Windows.Forms.TabControl();
this.tpBitly = new System.Windows.Forms.TabPage();
this.oauth2Bitly = new UploadersLib.GUI.OAuth2Control();
this.tpGoogleURLShortener = new System.Windows.Forms.TabPage();
this.oauth2GoogleURLShortener = new UploadersLib.GUI.OAuth2Control();
this.atcGoogleURLShortenerAccountType = new UploadersLib.GUI.AccountTypeControl();
this.tpYourls = new System.Windows.Forms.TabPage();
this.txtYourlsPassword = new System.Windows.Forms.TextBox();
this.txtYourlsUsername = new System.Windows.Forms.TextBox();
@ -262,6 +289,7 @@ private void InitializeComponent()
this.tcSocialNetworkingServices = new System.Windows.Forms.TabControl();
this.tpTwitter = new System.Windows.Forms.TabPage();
this.btnTwitterLogin = new System.Windows.Forms.Button();
this.ucTwitterAccounts = new UploadersLib.AccountsControl();
this.tpCustomUploaders = new System.Windows.Forms.TabPage();
this.btnCustomUploaderHelp = new System.Windows.Forms.Button();
this.lblCustomUploaderImageUploader = new System.Windows.Forms.Label();
@ -320,23 +348,8 @@ private void InitializeComponent()
this.txtCustomUploaderArgName = new System.Windows.Forms.TextBox();
this.txtRapidSharePremiumUserName = new System.Windows.Forms.TextBox();
this.ttHelpTip = new System.Windows.Forms.ToolTip(this.components);
this.oauth2Imgur = new UploadersLib.GUI.OAuth2Control();
this.atcImgurAccountType = new UploadersLib.GUI.AccountTypeControl();
this.atcImageShackAccountType = new UploadersLib.GUI.AccountTypeControl();
this.atcTinyPicAccountType = new UploadersLib.GUI.AccountTypeControl();
this.oauth2Picasa = new UploadersLib.GUI.OAuth2Control();
this.oAuth2Gist = new UploadersLib.GUI.OAuth2Control();
this.atcGistAccountType = new UploadersLib.GUI.AccountTypeControl();
this.ucFTPAccounts = new UploadersLib.AccountsControl();
this.oauth2GoogleDrive = new UploadersLib.GUI.OAuth2Control();
this.atcSendSpaceAccountType = new UploadersLib.GUI.AccountTypeControl();
this.oAuthJira = new UploadersLib.GUI.OAuth2Control();
this.ucLocalhostAccounts = new UploadersLib.AccountsControl();
this.oauth2Bitly = new UploadersLib.GUI.OAuth2Control();
this.oauth2GoogleURLShortener = new UploadersLib.GUI.OAuth2Control();
this.atcGoogleURLShortenerAccountType = new UploadersLib.GUI.AccountTypeControl();
this.ucTwitterAccounts = new UploadersLib.AccountsControl();
this.actRapidShareAccountType = new UploadersLib.GUI.AccountTypeControl();
this.cbAmazonS3CustomCNAME = new System.Windows.Forms.CheckBox();
this.tcUploaders.SuspendLayout();
this.tpImageUploaders.SuspendLayout();
this.tcImageUploaders.SuspendLayout();
@ -384,6 +397,7 @@ private void InitializeComponent()
this.tpSharedFolder.SuspendLayout();
this.tlpSharedFolders.SuspendLayout();
this.gbSharedFolder.SuspendLayout();
this.tpAmazonS3.SuspendLayout();
this.tpURLShorteners.SuspendLayout();
this.tcURLShorteners.SuspendLayout();
this.tpBitly.SuspendLayout();
@ -461,6 +475,18 @@ private void InitializeComponent()
this.tpImgur.Text = "Imgur";
this.tpImgur.UseVisualStyleBackColor = true;
//
// oauth2Imgur
//
this.oauth2Imgur.Location = new System.Drawing.Point(16, 16);
this.oauth2Imgur.LoginStatus = false;
this.oauth2Imgur.Name = "oauth2Imgur";
this.oauth2Imgur.Size = new System.Drawing.Size(328, 207);
this.oauth2Imgur.Status = "Status: Login required.";
this.oauth2Imgur.TabIndex = 6;
this.oauth2Imgur.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked);
this.oauth2Imgur.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked);
this.oauth2Imgur.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked);
//
// txtImgurAlbumID
//
this.txtImgurAlbumID.Location = new System.Drawing.Point(592, 28);
@ -539,6 +565,15 @@ private void InitializeComponent()
this.lblImgurThumbnailType.TabIndex = 1;
this.lblImgurThumbnailType.Text = "Thumbnail type:";
//
// atcImgurAccountType
//
this.atcImgurAccountType.Location = new System.Drawing.Point(8, 232);
this.atcImgurAccountType.Name = "atcImgurAccountType";
this.atcImgurAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImgurAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImgurAccountType.TabIndex = 0;
this.atcImgurAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged);
//
// tpImageShack
//
this.tpImageShack.Controls.Add(this.atcImageShackAccountType);
@ -558,6 +593,15 @@ private void InitializeComponent()
this.tpImageShack.Text = "ImageShack";
this.tpImageShack.UseVisualStyleBackColor = true;
//
// atcImageShackAccountType
//
this.atcImageShackAccountType.Location = new System.Drawing.Point(8, 16);
this.atcImageShackAccountType.Name = "atcImageShackAccountType";
this.atcImageShackAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImageShackAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImageShackAccountType.TabIndex = 10;
this.atcImageShackAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImageShackAccountType_AccountTypeChanged);
//
// btnImageShackLogin
//
this.btnImageShackLogin.Location = new System.Drawing.Point(296, 82);
@ -651,6 +695,15 @@ private void InitializeComponent()
this.tpTinyPic.Text = "TinyPic";
this.tpTinyPic.UseVisualStyleBackColor = true;
//
// atcTinyPicAccountType
//
this.atcTinyPicAccountType.Location = new System.Drawing.Point(8, 16);
this.atcTinyPicAccountType.Name = "atcTinyPicAccountType";
this.atcTinyPicAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcTinyPicAccountType.Size = new System.Drawing.Size(272, 29);
this.atcTinyPicAccountType.TabIndex = 0;
this.atcTinyPicAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged);
//
// btnTinyPicLogin
//
this.btnTinyPicLogin.Location = new System.Drawing.Point(296, 82);
@ -1182,6 +1235,18 @@ private void InitializeComponent()
this.btnPicasaRefreshAlbumList.UseVisualStyleBackColor = true;
this.btnPicasaRefreshAlbumList.Click += new System.EventHandler(this.btnPicasaRefreshAlbumList_Click);
//
// oauth2Picasa
//
this.oauth2Picasa.Location = new System.Drawing.Point(16, 16);
this.oauth2Picasa.LoginStatus = false;
this.oauth2Picasa.Name = "oauth2Picasa";
this.oauth2Picasa.Size = new System.Drawing.Size(328, 207);
this.oauth2Picasa.Status = "Login required.";
this.oauth2Picasa.TabIndex = 0;
this.oauth2Picasa.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked);
this.oauth2Picasa.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked);
this.oauth2Picasa.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked);
//
// tpTextUploaders
//
this.tpTextUploaders.Controls.Add(this.tcTextUploaders);
@ -1289,6 +1354,28 @@ private void InitializeComponent()
this.chkGistPublishPublic.UseVisualStyleBackColor = true;
this.chkGistPublishPublic.CheckedChanged += new System.EventHandler(this.chkGistPublishPublic_CheckedChanged);
//
// oAuth2Gist
//
this.oAuth2Gist.Enabled = false;
this.oAuth2Gist.IsRefreshable = false;
this.oAuth2Gist.Location = new System.Drawing.Point(16, 51);
this.oAuth2Gist.LoginStatus = false;
this.oAuth2Gist.Name = "oAuth2Gist";
this.oAuth2Gist.Size = new System.Drawing.Size(328, 173);
this.oAuth2Gist.Status = "Status: Login required.";
this.oAuth2Gist.TabIndex = 16;
this.oAuth2Gist.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked);
this.oAuth2Gist.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked);
//
// atcGistAccountType
//
this.atcGistAccountType.Location = new System.Drawing.Point(15, 16);
this.atcGistAccountType.Name = "atcGistAccountType";
this.atcGistAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGistAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGistAccountType.TabIndex = 15;
this.atcGistAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged);
//
// tpUpaste
//
this.tpUpaste.Controls.Add(this.cbUpasteIsPublic);
@ -1356,6 +1443,7 @@ private void InitializeComponent()
this.tcFileUploaders.Controls.Add(this.tpMinus);
this.tcFileUploaders.Controls.Add(this.tpEmail);
this.tcFileUploaders.Controls.Add(this.tpSharedFolder);
this.tcFileUploaders.Controls.Add(this.tpAmazonS3);
this.tcFileUploaders.Dock = System.Windows.Forms.DockStyle.Fill;
this.tcFileUploaders.Location = new System.Drawing.Point(3, 3);
this.tcFileUploaders.Name = "tcFileUploaders";
@ -1571,6 +1659,15 @@ private void InitializeComponent()
this.btnFTPImport.UseVisualStyleBackColor = true;
this.btnFTPImport.Click += new System.EventHandler(this.btnFTPImport_Click);
//
// ucFTPAccounts
//
this.ucFTPAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucFTPAccounts.Location = new System.Drawing.Point(0, 0);
this.ucFTPAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucFTPAccounts.Name = "ucFTPAccounts";
this.ucFTPAccounts.Size = new System.Drawing.Size(792, 345);
this.ucFTPAccounts.TabIndex = 0;
//
// gbFtpSettings
//
this.gbFtpSettings.Controls.Add(this.lblFtpFiles);
@ -1797,6 +1894,18 @@ private void InitializeComponent()
this.cbGoogleDriveIsPublic.UseVisualStyleBackColor = true;
this.cbGoogleDriveIsPublic.CheckedChanged += new System.EventHandler(this.cbGoogleDriveIsPublic_CheckedChanged);
//
// oauth2GoogleDrive
//
this.oauth2GoogleDrive.Location = new System.Drawing.Point(16, 16);
this.oauth2GoogleDrive.LoginStatus = false;
this.oauth2GoogleDrive.Name = "oauth2GoogleDrive";
this.oauth2GoogleDrive.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleDrive.Status = "Status: Login required.";
this.oauth2GoogleDrive.TabIndex = 0;
this.oauth2GoogleDrive.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked);
this.oauth2GoogleDrive.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked);
this.oauth2GoogleDrive.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked);
//
// tpBox
//
this.tpBox.Controls.Add(this.txtBoxFolderID);
@ -2018,6 +2127,15 @@ private void InitializeComponent()
this.txtSendSpaceUserName.TabIndex = 3;
this.txtSendSpaceUserName.TextChanged += new System.EventHandler(this.txtSendSpaceUserName_TextChanged);
//
// atcSendSpaceAccountType
//
this.atcSendSpaceAccountType.Location = new System.Drawing.Point(8, 16);
this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType";
this.atcSendSpaceAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcSendSpaceAccountType.Size = new System.Drawing.Size(214, 29);
this.atcSendSpaceAccountType.TabIndex = 0;
this.atcSendSpaceAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged);
//
// tpGe_tt
//
this.tpGe_tt.Controls.Add(this.lblGe_ttAccessToken);
@ -2220,6 +2338,18 @@ private void InitializeComponent()
this.lblJiraHost.TabIndex = 0;
this.lblJiraHost.Text = "Jira host: ";
//
// oAuthJira
//
this.oAuthJira.Location = new System.Drawing.Point(473, 13);
this.oAuthJira.LoginStatus = false;
this.oAuthJira.Name = "oAuthJira";
this.oAuthJira.Size = new System.Drawing.Size(328, 207);
this.oAuthJira.Status = "Status: Login required.";
this.oAuthJira.TabIndex = 1;
this.oAuthJira.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked);
this.oAuthJira.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked);
this.oAuthJira.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// tpMinus
//
this.tpMinus.Controls.Add(this.lblMinusURLType);
@ -2588,6 +2718,15 @@ private void InitializeComponent()
this.tlpSharedFolders.Size = new System.Drawing.Size(798, 469);
this.tlpSharedFolders.TabIndex = 0;
//
// ucLocalhostAccounts
//
this.ucLocalhostAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucLocalhostAccounts.Location = new System.Drawing.Point(4, 4);
this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucLocalhostAccounts.Name = "ucLocalhostAccounts";
this.ucLocalhostAccounts.Size = new System.Drawing.Size(790, 343);
this.ucLocalhostAccounts.TabIndex = 0;
//
// gbSharedFolder
//
this.gbSharedFolder.Controls.Add(this.lblSharedFolderFiles);
@ -2661,6 +2800,140 @@ private void InitializeComponent()
this.cboSharedFolderImages.TabIndex = 1;
this.cboSharedFolderImages.SelectedIndexChanged += new System.EventHandler(this.cboSharedFolderImages_SelectedIndexChanged);
//
// tpAmazonS3
//
this.tpAmazonS3.Controls.Add(this.cbAmazonS3CustomCNAME);
this.tpAmazonS3.Controls.Add(this.cbAmazonS3Endpoint);
this.tpAmazonS3.Controls.Add(this.lblAmazonS3BucketName);
this.tpAmazonS3.Controls.Add(this.txtAmazonS3BucketName);
this.tpAmazonS3.Controls.Add(this.lblAmazonS3Endpoint);
this.tpAmazonS3.Controls.Add(this.txtAmazonS3ObjectPrefix);
this.tpAmazonS3.Controls.Add(this.lblAmazonS3ObjectPrefix);
this.tpAmazonS3.Controls.Add(this.cbAmazonS3UseRRS);
this.tpAmazonS3.Controls.Add(this.txtAmazonS3SecretKey);
this.tpAmazonS3.Controls.Add(this.lblAmazonS3SecretKey);
this.tpAmazonS3.Controls.Add(this.lblAmazonS3AccessKey);
this.tpAmazonS3.Controls.Add(this.txtAmazonS3AccessKey);
this.tpAmazonS3.Location = new System.Drawing.Point(4, 22);
this.tpAmazonS3.Name = "tpAmazonS3";
this.tpAmazonS3.Padding = new System.Windows.Forms.Padding(3);
this.tpAmazonS3.Size = new System.Drawing.Size(804, 475);
this.tpAmazonS3.TabIndex = 13;
this.tpAmazonS3.Text = "Amazon S3";
this.tpAmazonS3.UseVisualStyleBackColor = true;
//
// cbAmazonS3Endpoint
//
this.cbAmazonS3Endpoint.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbAmazonS3Endpoint.FormattingEnabled = true;
this.cbAmazonS3Endpoint.Items.AddRange(new object[] {
"https://s3-ap-northeast-1.amazonaws.com/",
"https://s3-ap-southeast-1.amazonaws.com/",
"https://s3-ap-southeast-2.amazonaws.com/",
"https://s3-eu-west-1.amazonaws.com/",
"https://s3-sa-east-1.amazonaws.com/",
"https://s3-us-west-1.amazonaws.com/",
"https://s3-us-west-2.amazonaws.com/",
"https://s3.amazonaws.com/"});
this.cbAmazonS3Endpoint.Location = new System.Drawing.Point(108, 78);
this.cbAmazonS3Endpoint.Name = "cbAmazonS3Endpoint";
this.cbAmazonS3Endpoint.Size = new System.Drawing.Size(346, 21);
this.cbAmazonS3Endpoint.TabIndex = 19;
this.cbAmazonS3Endpoint.SelectionChangeCommitted += new System.EventHandler(this.cbAmazonS3Endpoint_SelectionChangeCommitted);
this.cbAmazonS3Endpoint.TextChanged += new System.EventHandler(this.cbAmazonS3Endpoint_TextChanged);
//
// lblAmazonS3BucketName
//
this.lblAmazonS3BucketName.AutoSize = true;
this.lblAmazonS3BucketName.Location = new System.Drawing.Point(21, 109);
this.lblAmazonS3BucketName.Name = "lblAmazonS3BucketName";
this.lblAmazonS3BucketName.Size = new System.Drawing.Size(75, 13);
this.lblAmazonS3BucketName.TabIndex = 18;
this.lblAmazonS3BucketName.Text = "Bucket Name:";
//
// txtAmazonS3BucketName
//
this.txtAmazonS3BucketName.Location = new System.Drawing.Point(108, 106);
this.txtAmazonS3BucketName.Name = "txtAmazonS3BucketName";
this.txtAmazonS3BucketName.Size = new System.Drawing.Size(184, 20);
this.txtAmazonS3BucketName.TabIndex = 17;
this.txtAmazonS3BucketName.TextChanged += new System.EventHandler(this.txtAmazonS3BucketName_TextChanged);
//
// lblAmazonS3Endpoint
//
this.lblAmazonS3Endpoint.AutoSize = true;
this.lblAmazonS3Endpoint.Location = new System.Drawing.Point(44, 82);
this.lblAmazonS3Endpoint.Name = "lblAmazonS3Endpoint";
this.lblAmazonS3Endpoint.Size = new System.Drawing.Size(52, 13);
this.lblAmazonS3Endpoint.TabIndex = 16;
this.lblAmazonS3Endpoint.Text = "Endpoint:";
//
// txtAmazonS3ObjectPrefix
//
this.txtAmazonS3ObjectPrefix.Location = new System.Drawing.Point(108, 132);
this.txtAmazonS3ObjectPrefix.Name = "txtAmazonS3ObjectPrefix";
this.txtAmazonS3ObjectPrefix.Size = new System.Drawing.Size(184, 20);
this.txtAmazonS3ObjectPrefix.TabIndex = 14;
this.ttHelpTip.SetToolTip(this.txtAmazonS3ObjectPrefix, "The name to prefix objects with when storing them. The first \"/\" isn\'t necessary." +
"");
this.txtAmazonS3ObjectPrefix.TextChanged += new System.EventHandler(this.txtAmazonS3ObjectPrefix_TextChanged);
//
// lblAmazonS3ObjectPrefix
//
this.lblAmazonS3ObjectPrefix.AutoSize = true;
this.lblAmazonS3ObjectPrefix.Location = new System.Drawing.Point(26, 135);
this.lblAmazonS3ObjectPrefix.Name = "lblAmazonS3ObjectPrefix";
this.lblAmazonS3ObjectPrefix.Size = new System.Drawing.Size(70, 13);
this.lblAmazonS3ObjectPrefix.TabIndex = 13;
this.lblAmazonS3ObjectPrefix.Text = "Object Prefix:";
//
// cbAmazonS3UseRRS
//
this.cbAmazonS3UseRRS.AutoSize = true;
this.cbAmazonS3UseRRS.Location = new System.Drawing.Point(108, 158);
this.cbAmazonS3UseRRS.Name = "cbAmazonS3UseRRS";
this.cbAmazonS3UseRRS.Size = new System.Drawing.Size(184, 17);
this.cbAmazonS3UseRRS.TabIndex = 11;
this.cbAmazonS3UseRRS.Text = "Use reduced redundancy storage";
this.ttHelpTip.SetToolTip(this.cbAmazonS3UseRRS, resources.GetString("cbAmazonS3UseRRS.ToolTip"));
this.cbAmazonS3UseRRS.UseVisualStyleBackColor = true;
this.cbAmazonS3UseRRS.CheckedChanged += new System.EventHandler(this.cbAmazonS3UseRRS_CheckedChanged);
//
// txtAmazonS3SecretKey
//
this.txtAmazonS3SecretKey.Location = new System.Drawing.Point(108, 52);
this.txtAmazonS3SecretKey.Name = "txtAmazonS3SecretKey";
this.txtAmazonS3SecretKey.Size = new System.Drawing.Size(346, 20);
this.txtAmazonS3SecretKey.TabIndex = 4;
this.txtAmazonS3SecretKey.UseSystemPasswordChar = true;
this.txtAmazonS3SecretKey.TextChanged += new System.EventHandler(this.txtAmazonS3SecretKey_TextChanged);
//
// lblAmazonS3SecretKey
//
this.lblAmazonS3SecretKey.AutoSize = true;
this.lblAmazonS3SecretKey.Location = new System.Drawing.Point(34, 55);
this.lblAmazonS3SecretKey.Name = "lblAmazonS3SecretKey";
this.lblAmazonS3SecretKey.Size = new System.Drawing.Size(62, 13);
this.lblAmazonS3SecretKey.TabIndex = 3;
this.lblAmazonS3SecretKey.Text = "Secret Key:";
//
// lblAmazonS3AccessKey
//
this.lblAmazonS3AccessKey.AutoSize = true;
this.lblAmazonS3AccessKey.Location = new System.Drawing.Point(30, 26);
this.lblAmazonS3AccessKey.Name = "lblAmazonS3AccessKey";
this.lblAmazonS3AccessKey.Size = new System.Drawing.Size(66, 13);
this.lblAmazonS3AccessKey.TabIndex = 1;
this.lblAmazonS3AccessKey.Text = "Access Key:";
//
// txtAmazonS3AccessKey
//
this.txtAmazonS3AccessKey.Location = new System.Drawing.Point(108, 23);
this.txtAmazonS3AccessKey.Name = "txtAmazonS3AccessKey";
this.txtAmazonS3AccessKey.Size = new System.Drawing.Size(346, 20);
this.txtAmazonS3AccessKey.TabIndex = 2;
this.txtAmazonS3AccessKey.TextChanged += new System.EventHandler(this.txtAmazonS3AccessKey_TextChanged);
//
// tpURLShorteners
//
this.tpURLShorteners.Controls.Add(this.tcURLShorteners);
@ -2695,6 +2968,18 @@ private void InitializeComponent()
this.tpBitly.Text = "bit.ly";
this.tpBitly.UseVisualStyleBackColor = true;
//
// oauth2Bitly
//
this.oauth2Bitly.IsRefreshable = false;
this.oauth2Bitly.Location = new System.Drawing.Point(16, 16);
this.oauth2Bitly.LoginStatus = false;
this.oauth2Bitly.Name = "oauth2Bitly";
this.oauth2Bitly.Size = new System.Drawing.Size(328, 168);
this.oauth2Bitly.Status = "Login required.";
this.oauth2Bitly.TabIndex = 0;
this.oauth2Bitly.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked);
this.oauth2Bitly.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked);
//
// tpGoogleURLShortener
//
this.tpGoogleURLShortener.Controls.Add(this.oauth2GoogleURLShortener);
@ -2707,6 +2992,27 @@ private void InitializeComponent()
this.tpGoogleURLShortener.Text = "Google";
this.tpGoogleURLShortener.UseVisualStyleBackColor = true;
//
// oauth2GoogleURLShortener
//
this.oauth2GoogleURLShortener.Location = new System.Drawing.Point(16, 56);
this.oauth2GoogleURLShortener.LoginStatus = false;
this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener";
this.oauth2GoogleURLShortener.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleURLShortener.Status = "Status: Login required.";
this.oauth2GoogleURLShortener.TabIndex = 1;
this.oauth2GoogleURLShortener.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked);
this.oauth2GoogleURLShortener.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
//
// atcGoogleURLShortenerAccountType
//
this.atcGoogleURLShortenerAccountType.Location = new System.Drawing.Point(8, 16);
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGoogleURLShortenerAccountType.TabIndex = 0;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
//
// tpYourls
//
this.tpYourls.Controls.Add(this.txtYourlsPassword);
@ -2847,6 +3153,14 @@ private void InitializeComponent()
this.btnTwitterLogin.UseVisualStyleBackColor = true;
this.btnTwitterLogin.Click += new System.EventHandler(this.btnTwitterLogin_Click);
//
// ucTwitterAccounts
//
this.ucTwitterAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucTwitterAccounts.Location = new System.Drawing.Point(3, 3);
this.ucTwitterAccounts.Name = "ucTwitterAccounts";
this.ucTwitterAccounts.Size = new System.Drawing.Size(798, 469);
this.ucTwitterAccounts.TabIndex = 0;
//
// tpCustomUploaders
//
this.tpCustomUploaders.Controls.Add(this.btnCustomUploaderHelp);
@ -3438,171 +3752,6 @@ private void InitializeComponent()
this.ttHelpTip.UseAnimation = false;
this.ttHelpTip.UseFading = false;
//
// oauth2Imgur
//
this.oauth2Imgur.Location = new System.Drawing.Point(16, 16);
this.oauth2Imgur.LoginStatus = false;
this.oauth2Imgur.Name = "oauth2Imgur";
this.oauth2Imgur.Size = new System.Drawing.Size(328, 207);
this.oauth2Imgur.Status = "Status: Login required.";
this.oauth2Imgur.TabIndex = 6;
this.oauth2Imgur.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Imgur_OpenButtonClicked);
this.oauth2Imgur.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Imgur_CompleteButtonClicked);
this.oauth2Imgur.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Imgur_RefreshButtonClicked);
//
// atcImgurAccountType
//
this.atcImgurAccountType.Location = new System.Drawing.Point(8, 232);
this.atcImgurAccountType.Name = "atcImgurAccountType";
this.atcImgurAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImgurAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImgurAccountType.TabIndex = 0;
this.atcImgurAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImgurAccountType_AccountTypeChanged);
//
// atcImageShackAccountType
//
this.atcImageShackAccountType.Location = new System.Drawing.Point(8, 16);
this.atcImageShackAccountType.Name = "atcImageShackAccountType";
this.atcImageShackAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcImageShackAccountType.Size = new System.Drawing.Size(272, 29);
this.atcImageShackAccountType.TabIndex = 10;
this.atcImageShackAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcImageShackAccountType_AccountTypeChanged);
//
// atcTinyPicAccountType
//
this.atcTinyPicAccountType.Location = new System.Drawing.Point(8, 16);
this.atcTinyPicAccountType.Name = "atcTinyPicAccountType";
this.atcTinyPicAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcTinyPicAccountType.Size = new System.Drawing.Size(272, 29);
this.atcTinyPicAccountType.TabIndex = 0;
this.atcTinyPicAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcTinyPicAccountType_AccountTypeChanged);
//
// oauth2Picasa
//
this.oauth2Picasa.Location = new System.Drawing.Point(16, 16);
this.oauth2Picasa.LoginStatus = false;
this.oauth2Picasa.Name = "oauth2Picasa";
this.oauth2Picasa.Size = new System.Drawing.Size(328, 207);
this.oauth2Picasa.Status = "Login required.";
this.oauth2Picasa.TabIndex = 0;
this.oauth2Picasa.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Picasa_OpenButtonClicked);
this.oauth2Picasa.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Picasa_CompleteButtonClicked);
this.oauth2Picasa.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2Picasa_RefreshButtonClicked);
//
// oAuth2Gist
//
this.oAuth2Gist.Enabled = false;
this.oAuth2Gist.IsRefreshable = false;
this.oAuth2Gist.Location = new System.Drawing.Point(16, 51);
this.oAuth2Gist.LoginStatus = false;
this.oAuth2Gist.Name = "oAuth2Gist";
this.oAuth2Gist.Size = new System.Drawing.Size(328, 173);
this.oAuth2Gist.Status = "Status: Login required.";
this.oAuth2Gist.TabIndex = 16;
this.oAuth2Gist.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuth2Gist_OpenButtonClicked);
this.oAuth2Gist.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuth2Gist_CompleteButtonClicked);
//
// atcGistAccountType
//
this.atcGistAccountType.Location = new System.Drawing.Point(15, 16);
this.atcGistAccountType.Name = "atcGistAccountType";
this.atcGistAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGistAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGistAccountType.TabIndex = 15;
this.atcGistAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGistAccountType_AccountTypeChanged);
//
// ucFTPAccounts
//
this.ucFTPAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucFTPAccounts.Location = new System.Drawing.Point(0, 0);
this.ucFTPAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucFTPAccounts.Name = "ucFTPAccounts";
this.ucFTPAccounts.Size = new System.Drawing.Size(792, 345);
this.ucFTPAccounts.TabIndex = 0;
//
// oauth2GoogleDrive
//
this.oauth2GoogleDrive.Location = new System.Drawing.Point(16, 16);
this.oauth2GoogleDrive.LoginStatus = false;
this.oauth2GoogleDrive.Name = "oauth2GoogleDrive";
this.oauth2GoogleDrive.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleDrive.Status = "Status: Login required.";
this.oauth2GoogleDrive.TabIndex = 0;
this.oauth2GoogleDrive.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleDrive_OpenButtonClicked);
this.oauth2GoogleDrive.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleDrive_CompleteButtonClicked);
this.oauth2GoogleDrive.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleDrive_RefreshButtonClicked);
//
// atcSendSpaceAccountType
//
this.atcSendSpaceAccountType.Location = new System.Drawing.Point(8, 16);
this.atcSendSpaceAccountType.Name = "atcSendSpaceAccountType";
this.atcSendSpaceAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcSendSpaceAccountType.Size = new System.Drawing.Size(214, 29);
this.atcSendSpaceAccountType.TabIndex = 0;
this.atcSendSpaceAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcSendSpaceAccountType_AccountTypeChanged);
//
// oAuthJira
//
this.oAuthJira.Location = new System.Drawing.Point(473, 13);
this.oAuthJira.LoginStatus = false;
this.oAuthJira.Name = "oAuthJira";
this.oAuthJira.Size = new System.Drawing.Size(328, 207);
this.oAuthJira.Status = "Status: Login required.";
this.oAuthJira.TabIndex = 1;
this.oAuthJira.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oAuthJira_OpenButtonClicked);
this.oAuthJira.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oAuthJira_CompleteButtonClicked);
this.oAuthJira.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// ucLocalhostAccounts
//
this.ucLocalhostAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucLocalhostAccounts.Location = new System.Drawing.Point(4, 4);
this.ucLocalhostAccounts.Margin = new System.Windows.Forms.Padding(4);
this.ucLocalhostAccounts.Name = "ucLocalhostAccounts";
this.ucLocalhostAccounts.Size = new System.Drawing.Size(790, 343);
this.ucLocalhostAccounts.TabIndex = 0;
//
// oauth2Bitly
//
this.oauth2Bitly.IsRefreshable = false;
this.oauth2Bitly.Location = new System.Drawing.Point(16, 16);
this.oauth2Bitly.LoginStatus = false;
this.oauth2Bitly.Name = "oauth2Bitly";
this.oauth2Bitly.Size = new System.Drawing.Size(328, 168);
this.oauth2Bitly.Status = "Login required.";
this.oauth2Bitly.TabIndex = 0;
this.oauth2Bitly.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2Bitly_OpenButtonClicked);
this.oauth2Bitly.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2Bitly_CompleteButtonClicked);
//
// oauth2GoogleURLShortener
//
this.oauth2GoogleURLShortener.Location = new System.Drawing.Point(16, 56);
this.oauth2GoogleURLShortener.LoginStatus = false;
this.oauth2GoogleURLShortener.Name = "oauth2GoogleURLShortener";
this.oauth2GoogleURLShortener.Size = new System.Drawing.Size(328, 207);
this.oauth2GoogleURLShortener.Status = "Status: Login required.";
this.oauth2GoogleURLShortener.TabIndex = 1;
this.oauth2GoogleURLShortener.OpenButtonClicked += new UploadersLib.GUI.OAuth2Control.OpenButtonClickedEventHandler(this.oauth2GoogleURLShortener_OpenButtonClicked);
this.oauth2GoogleURLShortener.CompleteButtonClicked += new UploadersLib.GUI.OAuth2Control.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new UploadersLib.GUI.OAuth2Control.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
//
// atcGoogleURLShortenerAccountType
//
this.atcGoogleURLShortenerAccountType.Location = new System.Drawing.Point(8, 16);
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.Size = new System.Drawing.Size(214, 29);
this.atcGoogleURLShortenerAccountType.TabIndex = 0;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new UploadersLib.GUI.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
//
// ucTwitterAccounts
//
this.ucTwitterAccounts.Dock = System.Windows.Forms.DockStyle.Fill;
this.ucTwitterAccounts.Location = new System.Drawing.Point(3, 3);
this.ucTwitterAccounts.Name = "ucTwitterAccounts";
this.ucTwitterAccounts.Size = new System.Drawing.Size(798, 469);
this.ucTwitterAccounts.TabIndex = 0;
//
// actRapidShareAccountType
//
this.actRapidShareAccountType.Location = new System.Drawing.Point(8, 16);
@ -3611,6 +3760,20 @@ private void InitializeComponent()
this.actRapidShareAccountType.Size = new System.Drawing.Size(214, 29);
this.actRapidShareAccountType.TabIndex = 16;
//
// cbAmazonS3CustomCNAME
//
this.cbAmazonS3CustomCNAME.AutoSize = true;
this.cbAmazonS3CustomCNAME.Location = new System.Drawing.Point(108, 182);
this.cbAmazonS3CustomCNAME.Name = "cbAmazonS3CustomCNAME";
this.cbAmazonS3CustomCNAME.Size = new System.Drawing.Size(163, 17);
this.cbAmazonS3CustomCNAME.TabIndex = 20;
this.cbAmazonS3CustomCNAME.Text = "Bucket uses custom CNAME";
this.ttHelpTip.SetToolTip(this.cbAmazonS3CustomCNAME, "Use this option if you have a bucket set up with a custom CNAME.\r\nFor example, if" +
" your bucket is called bucket.example.com, and is accessible\r\nfrom http://bucket" +
".example.com/.");
this.cbAmazonS3CustomCNAME.UseVisualStyleBackColor = true;
this.cbAmazonS3CustomCNAME.CheckedChanged += new System.EventHandler(this.cbAmazonS3CustomCNAME_CheckedChanged);
//
// UploadersConfigForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -3704,6 +3867,8 @@ private void InitializeComponent()
this.tlpSharedFolders.ResumeLayout(false);
this.gbSharedFolder.ResumeLayout(false);
this.gbSharedFolder.PerformLayout();
this.tpAmazonS3.ResumeLayout(false);
this.tpAmazonS3.PerformLayout();
this.tpURLShorteners.ResumeLayout(false);
this.tcURLShorteners.ResumeLayout(false);
this.tpBitly.ResumeLayout(false);
@ -4034,5 +4199,18 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox cbUpasteIsPublic;
private System.Windows.Forms.CheckBox cbGoogleDriveIsPublic;
private System.Windows.Forms.Label lblMinusAuthStatus;
private System.Windows.Forms.TabPage tpAmazonS3;
private System.Windows.Forms.TextBox txtAmazonS3AccessKey;
private System.Windows.Forms.Label lblAmazonS3SecretKey;
private System.Windows.Forms.Label lblAmazonS3AccessKey;
private System.Windows.Forms.CheckBox cbAmazonS3UseRRS;
private System.Windows.Forms.TextBox txtAmazonS3ObjectPrefix;
private System.Windows.Forms.Label lblAmazonS3ObjectPrefix;
private System.Windows.Forms.Label lblAmazonS3Endpoint;
private System.Windows.Forms.Label lblAmazonS3BucketName;
private System.Windows.Forms.TextBox txtAmazonS3BucketName;
private System.Windows.Forms.ComboBox cbAmazonS3Endpoint;
private System.Windows.Forms.TextBox txtAmazonS3SecretKey;
private System.Windows.Forms.CheckBox cbAmazonS3CustomCNAME;
}
}

View file

@ -884,6 +884,50 @@ private void btnMegaRefreshFolders_Click(object sender, EventArgs e)
#endregion Mega
#region Amazon S3
private void txtAmazonS3AccessKey_TextChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.AccessKeyID = txtAmazonS3AccessKey.Text;
}
private void txtAmazonS3SecretKey_TextChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.SecretAccessKey = txtAmazonS3SecretKey.Text;
}
private void txtAmazonS3ObjectPrefix_TextChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.ObjectPrefix = txtAmazonS3ObjectPrefix.Text;
}
private void cbAmazonS3Endpoint_SelectionChangeCommitted(object sender, EventArgs e)
{
Config.AmazonS3Settings.Endpoint = cbAmazonS3Endpoint.Text;
}
private void cbAmazonS3Endpoint_TextChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.Endpoint = cbAmazonS3Endpoint.Text;
}
private void txtAmazonS3BucketName_TextChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.Bucket = txtAmazonS3BucketName.Text;
}
private void cbAmazonS3UseRRS_CheckedChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.UseReducedRedundancyStorage = cbAmazonS3UseRRS.Checked;
}
private void cbAmazonS3CustomCNAME_CheckedChanged(object sender, EventArgs e)
{
Config.AmazonS3Settings.UseCustomCNAME = cbAmazonS3CustomCNAME.Checked;
}
#endregion Amazon S3
#endregion File Uploaders
#region Text Uploaders

View file

@ -117,6 +117,17 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ttHelpTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ttHelpTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="cbAmazonS3UseRRS.ToolTip" xml:space="preserve">
<value>Use a lower-redundancy storage class for stored objects.
With this option, objects are cheaper to store, but have 99.99% durability, instead of 99.999999999%.
This means that they may be lost from Amazon S3 at some point.</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pbDropboxLogo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -234,7 +245,7 @@
cEDOIz9clMt26LAWUUxcLUy92z9hAUk7h0+HDimqY/4fT5V6IeBXOg8AAAAASUVORK5CYII=
</value>
</data>
<metadata name="ttHelpTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>72</value>
</metadata>
</root>

View file

@ -70,6 +70,7 @@ private void ControlSettings()
fileUploadersImageList.Images.Add("Email", Resources.mail);
fileUploadersImageList.Images.Add("Jira", Resources.jira);
fileUploadersImageList.Images.Add("Mega", Resources.Mega);
fileUploadersImageList.Images.Add("AmazonS3", Resources.AmazonS3);
tcFileUploaders.ImageList = fileUploadersImageList;
ImageList textUploadersImageList = new ImageList();
@ -121,6 +122,7 @@ private void ControlSettings()
tpMega.ImageKey = "Mega";
tpGist.ImageKey = "Gist";
tpUpaste.ImageKey = "Upaste";
tpAmazonS3.ImageKey = "AmazonS3";
cmsCustomUploaderArgValue = NameParser.CreateCodesMenu(txtCustomUploaderArgValue, ReplacementVariables.n);
@ -393,6 +395,16 @@ public void LoadSettings(UploadersConfig uploadersConfig)
MegaConfigureTab(false);
// Amazon S3
txtAmazonS3AccessKey.Text = Config.AmazonS3Settings.AccessKeyID;
txtAmazonS3SecretKey.Text = Config.AmazonS3Settings.SecretAccessKey;
cbAmazonS3UseRRS.Checked = Config.AmazonS3Settings.UseReducedRedundancyStorage;
cbAmazonS3Endpoint.Text = Config.AmazonS3Settings.Endpoint;
cbAmazonS3CustomCNAME.Checked = Config.AmazonS3Settings.UseCustomCNAME;
txtAmazonS3BucketName.Text = Config.AmazonS3Settings.Bucket;
txtAmazonS3ObjectPrefix.Text = Config.AmazonS3Settings.ObjectPrefix;
#endregion File uploaders
#region URL Shorteners

View file

@ -60,6 +60,16 @@ internal class Resources {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon AmazonS3 {
get {
object obj = ResourceManager.GetObject("AmazonS3", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>

View file

@ -304,4 +304,7 @@
<data name="Bitly" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\favicons\bitly.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AmazonS3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\favicons\AmazonS3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -194,6 +194,13 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public MegaApiClient.AuthInfos MegaAuthInfos = null;
public string MegaParentNodeId = null;
// Amazon S3
public AmazonS3Settings AmazonS3Settings = new AmazonS3Settings() {
ObjectPrefix = Application.ProductName + "/%y-%mo/",
UseReducedRedundancyStorage = true
};
#endregion File uploaders
#region URL shorteners

View file

@ -112,6 +112,7 @@
<Compile Include="FileUploaders\Box.cs" />
<Compile Include="FileUploaders\Email.cs" />
<Compile Include="FileUploaders\Ge_tt.cs" />
<Compile Include="FileUploaders\AmazonS3.cs" />
<Compile Include="FileUploaders\GoogleDrive.cs" />
<Compile Include="FileUploaders\Jira.cs" />
<Compile Include="FileUploaders\Hostr.cs" />
@ -437,6 +438,9 @@
<ItemGroup>
<None Include="Favicons\Upaste.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="Favicons\AmazonS3.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.