Add lambda.sx as a file uploader

This commit is contained in:
Marcus Stojcevich 2015-02-03 15:12:53 -05:00
parent 69f7ce6c19
commit eadb52b3cb
11 changed files with 341 additions and 61 deletions

View file

@ -120,6 +120,8 @@ public enum FileDestination
Localhostr,
[Description("JIRA")]
Jira,
[Description("λ")]
Lambda,
SharedFolder, // Localized
Email, // Localized
CustomFileUploader // Localized

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -0,0 +1,95 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright © 2007-2015 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 Newtonsoft.Json;
using ShareX.HelpersLib;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
namespace ShareX.UploadersLib.FileUploaders
{
public sealed class Lambda : FileUploader
{
public LambdaSettings Config { get; private set; }
public Lambda(LambdaSettings config)
{
Config = config;
}
private const string uploadUrl = "https://lambda.sx/upload";
private const string responseUrl = "https://λ.pw/";
public override UploadResult Upload(Stream stream, string fileName)
{
if (string.IsNullOrEmpty(Config.UserAPIKey))
{
Errors.Add("Missing API key. Set one in destination settings.");
return null;
}
Dictionary<string, string> arguments = new Dictionary<string, string>();
arguments.Add("apikey", Config.UserAPIKey);
UploadResult result = UploadData(stream, uploadUrl, fileName, "file", arguments);
if (result.IsSuccess) {
LambdaResponse response = JsonConvert.DeserializeObject<LambdaResponse>(result.Response);
if (response.success)
{
result.URL = responseUrl + response.files[0].url;
}
else
{
foreach (String e in response.errors) {
Errors.Add(e);
}
}
}
return result;
}
internal class LambdaResponse
{
public bool success { get; set; }
public List<LambdaFile> files { get; set; }
public List<String> errors { get; set; }
}
internal class LambdaFile
{
public string url { get; set; }
}
}
public class LambdaSettings
{
public string UserAPIKey = string.Empty;
}
}

View file

@ -293,6 +293,10 @@ private void InitializeComponent()
this.txtJiraHost = new System.Windows.Forms.TextBox();
this.lblJiraHost = new System.Windows.Forms.Label();
this.oAuthJira = new ShareX.UploadersLib.OAuthControl();
this.tpLambda = new System.Windows.Forms.TabPage();
this.lambdaInfoLabel = new System.Windows.Forms.Label();
this.lambdaApiKeyLabel = new System.Windows.Forms.Label();
this.txtLambdaApiKey = new System.Windows.Forms.TextBox();
this.tpEmail = new System.Windows.Forms.TabPage();
this.chkEmailConfirm = new System.Windows.Forms.CheckBox();
this.lblEmailSmtpServer = new System.Windows.Forms.Label();
@ -467,6 +471,7 @@ private void InitializeComponent()
this.gbMinusUpload.SuspendLayout();
this.tpJira.SuspendLayout();
this.gpJiraServer.SuspendLayout();
this.tpLambda.SuspendLayout();
this.tpEmail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).BeginInit();
this.tpSharedFolder.SuspendLayout();
@ -1182,6 +1187,7 @@ private void InitializeComponent()
this.tcFileUploaders.Controls.Add(this.tpHostr);
this.tcFileUploaders.Controls.Add(this.tpMinus);
this.tcFileUploaders.Controls.Add(this.tpJira);
this.tcFileUploaders.Controls.Add(this.tpLambda);
this.tcFileUploaders.Controls.Add(this.tpEmail);
this.tcFileUploaders.Controls.Add(this.tpSharedFolder);
resources.ApplyResources(this.tcFileUploaders, "tcFileUploaders");
@ -2423,6 +2429,33 @@ private void InitializeComponent()
this.oAuthJira.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oAuthJira_ClearButtonClicked);
this.oAuthJira.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oAuthJira_RefreshButtonClicked);
//
// tpLambda
//
this.tpLambda.Controls.Add(this.lambdaInfoLabel);
this.tpLambda.Controls.Add(this.lambdaApiKeyLabel);
this.tpLambda.Controls.Add(this.txtLambdaApiKey);
resources.ApplyResources(this.tpLambda, "tpLambda");
this.tpLambda.Name = "tpLambda";
this.tpLambda.UseVisualStyleBackColor = true;
//
// lambdaInfoLabel
//
resources.ApplyResources(this.lambdaInfoLabel, "lambdaInfoLabel");
this.lambdaInfoLabel.Name = "lambdaInfoLabel";
this.lambdaInfoLabel.Click += new System.EventHandler(this.lambdaInfoLabel_Click);
//
// lambdaApiKeyLabel
//
resources.ApplyResources(this.lambdaApiKeyLabel, "lambdaApiKeyLabel");
this.lambdaApiKeyLabel.Name = "lambdaApiKeyLabel";
//
// txtLambdaApiKey
//
resources.ApplyResources(this.txtLambdaApiKey, "txtLambdaApiKey");
this.txtLambdaApiKey.Name = "txtLambdaApiKey";
this.txtLambdaApiKey.UseSystemPasswordChar = true;
this.txtLambdaApiKey.TextChanged += new System.EventHandler(this.txtLambdaApiKey_TextChanged);
//
// tpEmail
//
this.tpEmail.Controls.Add(this.chkEmailConfirm);
@ -3480,6 +3513,8 @@ private void InitializeComponent()
this.tpJira.PerformLayout();
this.gpJiraServer.ResumeLayout(false);
this.gpJiraServer.PerformLayout();
this.tpLambda.ResumeLayout(false);
this.tpLambda.PerformLayout();
this.tpEmail.ResumeLayout(false);
this.tpEmail.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).EndInit();
@ -3921,6 +3956,10 @@ private void InitializeComponent()
private System.Windows.Forms.ColumnHeader chHubicFolderName;
private System.Windows.Forms.Label lblHubicSelectedFolder;
private System.Windows.Forms.Button btnHubicRefreshFolders;
private System.Windows.Forms.CheckBox cbHubicPublishLink;
private System.Windows.Forms.CheckBox cbHubicPublishLink;
private System.Windows.Forms.TabPage tpLambda;
private System.Windows.Forms.Label lambdaApiKeyLabel;
private System.Windows.Forms.TextBox txtLambdaApiKey;
private System.Windows.Forms.Label lambdaInfoLabel;
}
}

View file

@ -112,6 +112,7 @@ private void FormSettings()
AddIconToTab(tpTwitter, Resources.Twitter);
AddIconToTab(tpUpaste, Resources.Upaste);
AddIconToTab(tpYourls, Resources.Yourls);
AddIconToTab(tpLambda, Resources.Lambda);
tcFileUploaders.TabPages.Remove(tpHubic);
@ -550,6 +551,10 @@ public void LoadSettings(UploadersConfig uploadersConfig)
cbMediaCrushDirectLink.Checked = Config.MediaCrushDirectLink;
// Lambda
txtLambdaApiKey.Text = Config.LambdaSettings.UserAPIKey;
#endregion File uploaders
#region URL Shorteners
@ -2062,6 +2067,20 @@ private void cbMediaCrushDirectLink_CheckedChanged(object sender, EventArgs e)
#endregion MediaCrush
#region Lambda
private void txtLambdaApiKey_TextChanged(object sender, EventArgs e)
{
Config.LambdaSettings.UserAPIKey = txtLambdaApiKey.Text;
}
private void lambdaInfoLabel_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://lambda.sx/usercp");
}
#endregion Lambda
#endregion File Uploaders
#region URL Shorteners

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@ -1187,7 +1188,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="txtCustomUploaderLog.Text" xml:space="preserve">
<value />
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;txtCustomUploaderLog.Name" xml:space="preserve">
<value>txtCustomUploaderLog</value>
</data>
@ -1349,7 +1350,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblCustomUploaderURL.Text" xml:space="preserve">
<value>URL:</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblCustomUploaderURL.Name" xml:space="preserve">
<value>lblCustomUploaderURL</value>
</data>
@ -1637,7 +1638,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpTwitter.Text" xml:space="preserve">
<value>Twitter</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpTwitter.Name" xml:space="preserve">
<value>tpTwitter</value>
</data>
@ -1787,7 +1788,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpBitly.Text" xml:space="preserve">
<value>bit.ly</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpBitly.Name" xml:space="preserve">
<value>tpBitly</value>
</data>
@ -1856,7 +1857,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpGoogleURLShortener.Text" xml:space="preserve">
<value>Google</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGoogleURLShortener.Name" xml:space="preserve">
<value>tpGoogleURLShortener</value>
</data>
@ -2090,7 +2091,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblYourlsAPIURL.Text" xml:space="preserve">
<value>API URL:</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblYourlsAPIURL.Name" xml:space="preserve">
<value>lblYourlsAPIURL</value>
</data>
@ -2117,7 +2118,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpYourls.Text" xml:space="preserve">
<value>YOURLS</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpYourls.Name" xml:space="preserve">
<value>tpYourls</value>
</data>
@ -2198,7 +2199,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblAdflyAPIUID.Text" xml:space="preserve">
<value>API UID:</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblAdflyAPIUID.Name" xml:space="preserve">
<value>lblAdflyAPIUID</value>
</data>
@ -2276,7 +2277,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpAdFly.Text" xml:space="preserve">
<value>adf.ly</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpAdFly.Name" xml:space="preserve">
<value>tpAdFly</value>
</data>
@ -2551,7 +2552,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>4, 4, 4, 4</value>
</data>
<data name="ucFTPAccounts.Size" type="System.Drawing.Size, System.Drawing">
<value>792, 432</value>
<value>792, 414</value>
</data>
<data name="ucFTPAccounts.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@ -2582,7 +2583,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpFTP.Text" xml:space="preserve">
<value>FTP</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpFTP.Name" xml:space="preserve">
<value>tpFTP</value>
</data>
@ -2992,7 +2993,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpDropbox.Text" xml:space="preserve">
<value>Dropbox</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpDropbox.Name" xml:space="preserve">
<value>tpDropbox</value>
</data>
@ -3124,7 +3125,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpOneDrive.Text" xml:space="preserve">
<value>OneDrive</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpOneDrive.Name" xml:space="preserve">
<value>tpOneDrive</value>
</data>
@ -3346,7 +3347,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpGoogleDrive.Text" xml:space="preserve">
<value>Google Drive</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGoogleDrive.Name" xml:space="preserve">
<value>tpGoogleDrive</value>
</data>
@ -3541,7 +3542,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpBox.Text" xml:space="preserve">
<value>Box</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpBox.Name" xml:space="preserve">
<value>tpBox</value>
</data>
@ -3862,7 +3863,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpCopy.Text" xml:space="preserve">
<value>Copy</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpCopy.Name" xml:space="preserve">
<value>tpCopy</value>
</data>
@ -4057,7 +4058,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpHubic.Text" xml:space="preserve">
<value>hubiC</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpHubic.Name" xml:space="preserve">
<value>tpHubic</value>
</data>
@ -4165,7 +4166,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="btnAmazonS3BucketNameOpen.Text" xml:space="preserve">
<value>...</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;btnAmazonS3BucketNameOpen.Name" xml:space="preserve">
<value>btnAmazonS3BucketNameOpen</value>
</data>
@ -4192,7 +4193,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="btnAmazonS3AccessKeyOpen.Text" xml:space="preserve">
<value>...</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;btnAmazonS3AccessKeyOpen.Name" xml:space="preserve">
<value>btnAmazonS3AccessKeyOpen</value>
</data>
@ -4207,31 +4208,31 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="cbAmazonS3Endpoint.Items" xml:space="preserve">
<value>https://s3-ap-northeast-1.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items1" xml:space="preserve">
<value>https://s3-ap-southeast-1.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items2" xml:space="preserve">
<value>https://s3-ap-southeast-2.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items3" xml:space="preserve">
<value>https://s3-eu-west-1.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items4" xml:space="preserve">
<value>https://s3-sa-east-1.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items5" xml:space="preserve">
<value>https://s3-us-west-1.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items6" xml:space="preserve">
<value>https://s3-us-west-2.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items7" xml:space="preserve">
<value>https://s3.amazonaws.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Items8" xml:space="preserve">
<value>https://objects.dreamhost.com/</value>
<comment>@Invariant</comment></data>
</data>
<data name="cbAmazonS3Endpoint.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 128</value>
</data>
@ -4501,7 +4502,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpAmazonS3.Text" xml:space="preserve">
<value>Amazon S3</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpAmazonS3.Name" xml:space="preserve">
<value>tpAmazonS3</value>
</data>
@ -4819,7 +4820,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpMega.Text" xml:space="preserve">
<value>Mega</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMega.Name" xml:space="preserve">
<value>tpMega</value>
</data>
@ -5140,7 +5141,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpOwnCloud.Text" xml:space="preserve">
<value>ownCloud</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpOwnCloud.Name" xml:space="preserve">
<value>tpOwnCloud</value>
</data>
@ -5353,7 +5354,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpMediaFire.Text" xml:space="preserve">
<value>MediaFire</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMediaFire.Name" xml:space="preserve">
<value>tpMediaFire</value>
</data>
@ -5515,7 +5516,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPushbullet.Text" xml:space="preserve">
<value>Pushbullet</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPushbullet.Name" xml:space="preserve">
<value>tpPushbullet</value>
</data>
@ -5743,7 +5744,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpRapidShare.Text" xml:space="preserve">
<value>RapidShare</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpRapidShare.Name" xml:space="preserve">
<value>tpRapidShare</value>
</data>
@ -5920,7 +5921,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpSendSpace.Text" xml:space="preserve">
<value>SendSpace</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpSendSpace.Name" xml:space="preserve">
<value>tpSendSpace</value>
</data>
@ -5977,7 +5978,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpMediaCrush.Text" xml:space="preserve">
<value>MediaCrush</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMediaCrush.Name" xml:space="preserve">
<value>tpMediaCrush</value>
</data>
@ -6163,7 +6164,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpGe_tt.Text" xml:space="preserve">
<value>Ge.tt</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGe_tt.Name" xml:space="preserve">
<value>tpGe_tt</value>
</data>
@ -6322,7 +6323,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpHostr.Text" xml:space="preserve">
<value>Hostr</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpHostr.Name" xml:space="preserve">
<value>tpHostr</value>
</data>
@ -6772,7 +6773,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpMinus.Text" xml:space="preserve">
<value>Minus</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpMinus.Name" xml:space="preserve">
<value>tpMinus</value>
</data>
@ -6796,7 +6797,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="txtJiraIssuePrefix.Text" xml:space="preserve">
<value>PROJECT-</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;txtJiraIssuePrefix.Name" xml:space="preserve">
<value>txtJiraIssuePrefix</value>
</data>
@ -6880,7 +6881,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="txtJiraHost.Text" xml:space="preserve">
<value>http://</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;txtJiraHost.Name" xml:space="preserve">
<value>txtJiraHost</value>
</data>
@ -6979,7 +6980,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpJira.Text" xml:space="preserve">
<value>Atlassian Jira</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpJira.Name" xml:space="preserve">
<value>tpJira</value>
</data>
@ -6992,6 +6993,108 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<data name="&gt;&gt;tpJira.ZOrder" xml:space="preserve">
<value>18</value>
</data>
<data name="lambdaInfoLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lambdaInfoLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 7</value>
</data>
<data name="lambdaInfoLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>498, 20</value>
</data>
<data name="lambdaInfoLabel.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="lambdaInfoLabel.Text" xml:space="preserve">
<value>To get an API key, log in to Lambda at https://lambda.sx/ then click on the settings cog at the top right.</value>
</data>
<data name="&gt;&gt;lambdaInfoLabel.Name" xml:space="preserve">
<value>lambdaInfoLabel</value>
</data>
<data name="&gt;&gt;lambdaInfoLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lambdaInfoLabel.Parent" xml:space="preserve">
<value>tpLambda</value>
</data>
<data name="&gt;&gt;lambdaInfoLabel.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="lambdaApiKeyLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lambdaApiKeyLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 32</value>
</data>
<data name="lambdaApiKeyLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 14</value>
</data>
<data name="lambdaApiKeyLabel.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="lambdaApiKeyLabel.Text" xml:space="preserve">
<value>API Key:</value>
</data>
<data name="&gt;&gt;lambdaApiKeyLabel.Name" xml:space="preserve">
<value>lambdaApiKeyLabel</value>
</data>
<data name="&gt;&gt;lambdaApiKeyLabel.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lambdaApiKeyLabel.Parent" xml:space="preserve">
<value>tpLambda</value>
</data>
<data name="&gt;&gt;lambdaApiKeyLabel.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="txtLambdaApiKey.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 49</value>
</data>
<data name="txtLambdaApiKey.Size" type="System.Drawing.Size, System.Drawing">
<value>346, 20</value>
</data>
<data name="txtLambdaApiKey.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;txtLambdaApiKey.Name" xml:space="preserve">
<value>txtLambdaApiKey</value>
</data>
<data name="&gt;&gt;txtLambdaApiKey.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtLambdaApiKey.Parent" xml:space="preserve">
<value>tpLambda</value>
</data>
<data name="&gt;&gt;txtLambdaApiKey.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="tpLambda.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 40</value>
</data>
<data name="tpLambda.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpLambda.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 475</value>
</data>
<data name="tpLambda.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="tpLambda.Text" xml:space="preserve">
<value>λ</value>
</data>
<data name="&gt;&gt;tpLambda.Name" xml:space="preserve">
<value>tpLambda</value>
</data>
<data name="&gt;&gt;tpLambda.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tpLambda.Parent" xml:space="preserve">
<value>tcFileUploaders</value>
</data>
<data name="&gt;&gt;tpLambda.ZOrder" xml:space="preserve">
<value>19</value>
</data>
<data name="chkEmailConfirm.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -7389,7 +7492,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>tcFileUploaders</value>
</data>
<data name="&gt;&gt;tpEmail.ZOrder" xml:space="preserve">
<value>19</value>
<value>20</value>
</data>
<data name="lblSharedFolderFiles.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -7596,7 +7699,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
<value>tcFileUploaders</value>
</data>
<data name="&gt;&gt;tpSharedFolder.ZOrder" xml:space="preserve">
<value>20</value>
<value>21</value>
</data>
<data name="tcFileUploaders.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@ -8071,7 +8174,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPastebin.Text" xml:space="preserve">
<value>Pastebin</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPastebin.Name" xml:space="preserve">
<value>tpPastebin</value>
</data>
@ -8149,7 +8252,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPaste_ee.Text" xml:space="preserve">
<value>Paste.ee</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPaste_ee.Name" xml:space="preserve">
<value>tpPaste_ee</value>
</data>
@ -8248,7 +8351,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpGist.Text" xml:space="preserve">
<value>Gist</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpGist.Name" xml:space="preserve">
<value>tpGist</value>
</data>
@ -8356,7 +8459,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpUpaste.Text" xml:space="preserve">
<value>uPaste</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpUpaste.Name" xml:space="preserve">
<value>tpUpaste</value>
</data>
@ -8485,7 +8588,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpHastebin.Text" xml:space="preserve">
<value>Hastebin</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpHastebin.Name" xml:space="preserve">
<value>tpHastebin</value>
</data>
@ -8653,7 +8756,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="chImgurID.Text" xml:space="preserve">
<value>ID</value>
<comment>@Invariant</comment></data>
</data>
<data name="chImgurTitle.Text" xml:space="preserve">
<value>Title</value>
</data>
@ -8782,7 +8885,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpImgur.Text" xml:space="preserve">
<value>Imgur</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpImgur.Name" xml:space="preserve">
<value>tpImgur</value>
</data>
@ -9022,7 +9125,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpImageShack.Text" xml:space="preserve">
<value>ImageShack</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpImageShack.Name" xml:space="preserve">
<value>tpImageShack</value>
</data>
@ -9226,7 +9329,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpTinyPic.Text" xml:space="preserve">
<value>TinyPic</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpTinyPic.Name" xml:space="preserve">
<value>tpTinyPic</value>
</data>
@ -9406,7 +9509,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpFlickr.Text" xml:space="preserve">
<value>Flickr</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpFlickr.Name" xml:space="preserve">
<value>tpFlickr</value>
</data>
@ -9898,7 +10001,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPhotobucket.Text" xml:space="preserve">
<value>Photobucket</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPhotobucket.Name" xml:space="preserve">
<value>tpPhotobucket</value>
</data>
@ -9964,7 +10067,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="chPicasaID.Text" xml:space="preserve">
<value>ID</value>
<comment>@Invariant</comment></data>
</data>
<data name="chPicasaID.Width" type="System.Int32, mscorlib">
<value>135</value>
</data>
@ -10066,7 +10169,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpPicasa.Text" xml:space="preserve">
<value>Picasa</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpPicasa.Name" xml:space="preserve">
<value>tpPicasa</value>
</data>
@ -10126,7 +10229,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="lblCheveretoWebsiteTip.Text" xml:space="preserve">
<value>/api/1/upload</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;lblCheveretoWebsiteTip.Name" xml:space="preserve">
<value>lblCheveretoWebsiteTip</value>
</data>
@ -10255,7 +10358,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
</data>
<data name="tpChevereto.Text" xml:space="preserve">
<value>Chevereto</value>
<comment>@Invariant</comment></data>
</data>
<data name="&gt;&gt;tpChevereto.Name" xml:space="preserve">
<value>tpChevereto</value>
</data>

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
// Runtime Version:4.0.30319.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -411,6 +411,16 @@ internal class Resources {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon Lambda {
get {
object obj = ResourceManager.GetObject("Lambda", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -324,6 +324,9 @@
<data name="Hastebin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\Hastebin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Lambda" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\favicons\Lambda.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OAuthControl_Status_Status__Not_logged_in_" xml:space="preserve">
<value>Status: Not logged in.</value>
</data>

View file

@ -100,6 +100,7 @@
<Compile Include="APIKeys\APIKeys.cs" />
<Compile Include="APIKeys\APIKeysLocal.cs" />
<Compile Include="FileUploaders\Box.cs" />
<Compile Include="FileUploaders\Lambda.cs" />
<Compile Include="FileUploaders\Copy.cs" />
<Compile Include="FileUploaders\Email.cs" />
<Compile Include="FileUploaders\Ge_tt.cs" />
@ -420,6 +421,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Forms\UploadersConfigForm.de.resx">
<DependentUpon>UploadersConfigForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Forms\UploadersConfigForm.fr.resx">
<DependentUpon>UploadersConfigForm.cs</DependentUpon>

View file

@ -251,6 +251,10 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public bool MediaCrushDirectLink = false;
// Lambda
public LambdaSettings LambdaSettings = new LambdaSettings();
#endregion File uploaders
#region URL shorteners

View file

@ -992,6 +992,9 @@ public UploadResult UploadFile(Stream stream, string fileName)
case FileDestination.Pomf:
fileUploader = new Pomf();
break;
case FileDestination.Lambda:
fileUploader = new Lambda(Program.UploadersConfig.LambdaSettings);
break;
}
if (fileUploader != null)