Closes #1466 - Uplea Integration (#1899)

* Initial check-in to address feature enhancement request #1466.

* Checking in missing constructor parameter so fork is stable.

* Wrapping up Uplea integration support for #1466.

* Reverted Uploader.cs to earlier version as those changes weren't actually needed.

* Removed use of DataContractJsonSerializer, using JSON .NET instead. Updated the Uplea class to not store the configuration object internally, but to only pull out the API key when the config is passed through its constructor.

* Incorporating recent round of refactoring changes suggested by Jaex.

* Addressing issue with user workflow on the Uplea destination configuration tab.

* Attempt to reconcile UploadersConfigForm.resx.

* Fixing the name for an unnamed label. Updating resx formatting for base64 encoded pbDropboxLogo.Image value; since the diff on GitHub was showing a material change although VS diff ignores the formatting difference. Removed unneeded string.Format from Upload() in Uplea along with the set for IsURLExpected (since it is already true by default).

* Removed extra whitespace next to the end of the value tag since GitHub diff was still showing a difference.

* Removing references to label4 from resx which weren't removed by VS automatically when the control was renamed. The new entries for the renamed control lblUpleaEmailAddress already exist in the file.
This commit is contained in:
osfancy 2016-09-12 19:13:34 -04:00 committed by Jaex
parent be5f57ef9a
commit 64cc6f39ec
10 changed files with 1196 additions and 342 deletions

View file

@ -140,6 +140,8 @@ public enum FileDestination
Lithiio,
[Description("transfer.sh")]
Transfersh,
[Description("Uplea")]
Uplea,
SharedFolder, // Localized
Email, // Localized
CustomFileUploader // Localized

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,230 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2016 ShareX Team
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 System;
using System.IO;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Collections.Generic;
using ShareX.UploadersLib.Properties;
using Newtonsoft.Json;
namespace ShareX.UploadersLib.FileUploaders
{
public class UpleaUploaderService : FileUploaderService
{
public override FileDestination EnumValue { get; } = FileDestination.Uplea;
public override Icon ServiceIcon => Resources.Uplea;
public override bool CheckConfig(UploadersConfig config)
{
return !string.IsNullOrEmpty(config.UpleaApiKey);
}
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{
return new Uplea() { UpleaApiKey = config.UpleaApiKey };
}
public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpUplea;
}
[Localizable(false)]
public sealed class Uplea : FileUploader
{
private const string upleaBaseUrl = "http://api.uplea.com/api/";
public string UpleaApiKey { get; set; }
public UpleaGetUserInformationResponse GetUserInformation(string apiKey)
{
var upleaGetUserInformationResponse = JsonConvert.DeserializeObject<UpleaGetUserInformationResponse>(GetUpleaResponse<UpleaGetUserInformationRequest>(new UpleaGetUserInformationRequest() { ApiKey = apiKey }));
if (upleaGetUserInformationResponse.Status)
{
return upleaGetUserInformationResponse;
}
return new UpleaGetUserInformationResponse();
}
private UpleaNode GetBestNode()
{
var getBestNodeResponse = JsonConvert.DeserializeObject<UpleaGetBestNodeResponse>(SendRequest(HttpMethod.POST, upleaBaseUrl + "get-best-node"));
return new UpleaNode(getBestNodeResponse.Result.Name, getBestNodeResponse.Result.Token);
}
public string GetApiKey(string username, string password)
{
var upleaGetApiKeyResponseStr = GetUpleaResponse(new UpleaGetApiKeyRequest() { Username = username, Password = password });
if (!string.IsNullOrEmpty(upleaGetApiKeyResponseStr))
{
try
{
var upleaGetApiKeyResponse = JsonConvert.DeserializeObject<UpleaGetApiKeyResponse>(upleaGetApiKeyResponseStr);
if (upleaGetApiKeyResponse.Status)
{
return upleaGetApiKeyResponse.Result.ApiKey;
}
}
catch (JsonSerializationException ex)
{
// For some reason the Uplea API is supposed to return a single object in the result property of the response, but when
// there is an error it returns an empty array. This is causing deserialziation to fail. Do we want to just query the JSON
// status before trying to deserialize?
System.Diagnostics.Debug.WriteLine("Deserialization of UpleaGetApiKeyResponse failed: {0}", ex.Message);
}
}
return string.Empty;
}
private string GetUpleaResponse<T>(T upleaRequest) where T : IUpleaRequest
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("json", JsonConvert.SerializeObject(upleaRequest));
return SendRequestURLEncoded(upleaBaseUrl + upleaRequest.RequestType, parameters);
}
public override UploadResult Upload(Stream stream, string fileName)
{
var upleaBestNode = GetBestNode();
Dictionary<string, string> args = new Dictionary<string, string>();
args.Add("api_key", UpleaApiKey);
args.Add("token", upleaBestNode.Token);
args.Add("file_id[]", Guid.NewGuid().ToString());
UploadResult result = UploadData(stream, string.Format("http://{0}/", upleaBestNode.Name), fileName, "files[]", args);
var uploadResult = JsonConvert.DeserializeObject<UpleaGetUpleaUploadResponse>(result.Response);
if (uploadResult.Files.Length > 0)
{
result.URL = uploadResult.Files[0].Url;
}
return result;
}
private sealed class UpleaNode
{
public UpleaNode(string name, string token)
{
Name = name;
Token = token;
}
public string Name { get; private set; }
public string Token { get; private set; }
}
#region Uplea Responses
private sealed class UpleaGetUpleaUploadResponse
{
public class UpleaUploadResult
{
public string Url { get; set; }
}
public UpleaUploadResult[] Files { get; set; }
}
private sealed class UpleaGetBestNodeResponse
{
[JsonObject]
public class UpleaGetBestNodeResult
{
public string Name { get; set; }
public string Token { get; set; }
}
public UpleaGetBestNodeResult Result { get; set; }
public bool Status { get; set; }
}
private sealed class UpleaGetApiKeyResponse
{
public class UpleaGetApiKeyResult
{
[JsonProperty(PropertyName = "api_key")]
public string ApiKey { get; set; }
}
public UpleaGetApiKeyResult Result { get; set; }
public bool Status { get; set; }
}
public sealed class UpleaGetUserInformationResponse
{
public class UpleaUserInformationResult
{
[JsonProperty(PropertyName = "mail")]
public string EmailAddress { get; set; }
[JsonProperty(PropertyName = "instant_download")]
public bool InstantDownloadEnabled { get; set; }
[JsonProperty(PropertyName = "is_premium")]
public bool IsPremiumMember { get; set; }
}
public UpleaUserInformationResult Result { get; set; }
public bool Status { get; set; }
}
#endregion
#region Uplea Requests
private sealed class UpleaGetApiKeyRequest : IUpleaRequest
{
[JsonProperty(PropertyName = "username")]
public string Username { get; set; }
[JsonProperty(PropertyName = "password")]
public string Password { get; set; }
[JsonIgnore]
public string RequestType { get; } = "get-my-api-key";
}
private sealed class UpleaGetUserInformationRequest : IUpleaRequest
{
[JsonProperty(PropertyName = "api_key")]
public string ApiKey { get; set; }
[JsonIgnore]
public string RequestType { get; } = "get-user-info";
}
#endregion
#region Uplea Request Interface
private interface IUpleaRequest
{
string RequestType { get; }
}
#endregion
}
}

File diff suppressed because it is too large Load diff

View file

@ -578,6 +578,14 @@ public void LoadSettings()
txtStreamableUsername.Enabled = txtStreamablePassword.Enabled = !Config.StreamableAnonymous;
cbStreamableUseDirectURL.Checked = Config.StreamableUseDirectURL;
// Uplea
txtUpleaApiKey.Text = Config.UpleaApiKey;
txtUpleaUsername.Text = Config.UpleaUsername;
txtUpleaPassword.Text = Config.UpleaPassword;
txtUpleaEmailAddress.Text = Config.UpleaEmailAddress;
cbUpleaInstantDownloadEnabled.Checked = Config.UpleaInstantDownloadEnabled;
cbUpleaIsPremium.Checked = Config.UpleaIsPremiumMember;
#endregion File uploaders
#region URL shorteners
@ -2546,6 +2554,80 @@ private void cbStreamableUseDirectURL_CheckedChanged(object sender, EventArgs e)
#endregion Streamable
#region Uplea
private void btnUpleaLogin_Click(object sender, EventArgs e)
{
btnUpleaLogin.Enabled = false;
Uplea uplea = new Uplea();
txtUpleaApiKey.Text = string.Empty;
cbUpleaIsPremium.Checked = false;
cbUpleaInstantDownloadEnabled.Checked = false;
try
{
string apiKey = uplea.GetApiKey(txtUpleaUsername.Text, txtUpleaPassword.Text);
txtUpleaApiKey.Text = apiKey;
if (!string.IsNullOrEmpty(apiKey))
{
var upleaUserInformation = uplea.GetUserInformation(apiKey);
txtUpleaEmailAddress.Text = upleaUserInformation.Result.EmailAddress;
cbUpleaIsPremium.Checked = upleaUserInformation.Result.IsPremiumMember;
cbUpleaInstantDownloadEnabled.Checked = upleaUserInformation.Result.InstantDownloadEnabled;
}
else
{
MessageBox.Show("Unable to retrieve API key and user details from Uplea. Please check your user credentials and try again.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
finally
{
btnUpleaLogin.Enabled = true;
}
}
private void txtUpleaUsername_TextChanged(object sender, EventArgs e)
{
Config.UpleaUsername = (sender as TextBox).Text;
}
private void txtUpleaPassword_TextChanged(object sender, EventArgs e)
{
Config.UpleaPassword = (sender as TextBox).Text;
}
private void txtUpleaApiKey_TextChanged(object sender, EventArgs e)
{
Config.UpleaApiKey = (sender as TextBox).Text;
if (string.IsNullOrEmpty(txtUpleaApiKey.Text))
{
txtUpleaEmailAddress.Text = string.Empty;
cbUpleaIsPremium.Checked = false;
cbUpleaInstantDownloadEnabled.Checked = false;
}
}
private void txtUpleaEmailAddress_TextChanged(object sender, EventArgs e)
{
Config.UpleaEmailAddress = (sender as TextBox).Text;
}
private void cbUpleaIsPremium_CheckedChanged(object sender, EventArgs e)
{
Config.UpleaIsPremiumMember = (sender as CheckBox).Checked;
}
private void cbUpleaInstantDownloadEnabled_CheckedChanged(object sender, EventArgs e)
{
Config.UpleaInstantDownloadEnabled = (sender as CheckBox).Checked;
}
#endregion
#endregion File Uploaders
#region URL Shorteners

View file

@ -13483,4 +13483,385 @@ Using an encrypted library disables sharing.</value>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnUpleaLogin.Name" xml:space="preserve">
<value>btnUpleaLogin</value>
</data>
<data name="&gt;&gt;btnUpleaLogin.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;btnUpleaLogin.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnUpleaLogin.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;cbUpleaInstantDownloadEnabled.Name" xml:space="preserve">
<value>cbUpleaInstantDownloadEnabled</value>
</data>
<data name="&gt;&gt;cbUpleaInstantDownloadEnabled.Parent" xml:space="preserve">
<value>gbUpleaUserInformation</value>
</data>
<data name="&gt;&gt;cbUpleaInstantDownloadEnabled.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbUpleaInstantDownloadEnabled.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;cbUpleaIsPremium.Name" xml:space="preserve">
<value>cbUpleaIsPremium</value>
</data>
<data name="&gt;&gt;cbUpleaIsPremium.Parent" xml:space="preserve">
<value>gbUpleaUserInformation</value>
</data>
<data name="&gt;&gt;cbUpleaIsPremium.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbUpleaIsPremium.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;gbUpleaLoginCredentials.Name" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;gbUpleaLoginCredentials.Parent" xml:space="preserve">
<value>tpUplea</value>
</data>
<data name="&gt;&gt;gbUpleaLoginCredentials.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gbUpleaLoginCredentials.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;gbUpleaUserInformation.Name" xml:space="preserve">
<value>gbUpleaUserInformation</value>
</data>
<data name="&gt;&gt;gbUpleaUserInformation.Parent" xml:space="preserve">
<value>tpUplea</value>
</data>
<data name="&gt;&gt;gbUpleaUserInformation.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gbUpleaUserInformation.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;lblUpleaApiKey.Name" xml:space="preserve">
<value>lblUpleaApiKey</value>
</data>
<data name="&gt;&gt;lblUpleaApiKey.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;lblUpleaApiKey.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;lblUpleaApiKey.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;lblUpleaPassword.Name" xml:space="preserve">
<value>lblUpleaPassword</value>
</data>
<data name="&gt;&gt;lblUpleaPassword.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;lblUpleaPassword.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;lblUpleaPassword.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;lblUpleaUsername.Name" xml:space="preserve">
<value>lblUpleaUsername</value>
</data>
<data name="&gt;&gt;lblUpleaUsername.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;lblUpleaUsername.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;lblUpleaUsername.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;tpUplea.Name" xml:space="preserve">
<value>tpUplea</value>
</data>
<data name="&gt;&gt;tpUplea.Parent" xml:space="preserve">
<value>tcFileUploaders</value>
</data>
<data name="&gt;&gt;tpUplea.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;tpUplea.ZOrder" xml:space="preserve">
<value>24</value>
</data>
<data name="&gt;&gt;txtUpleaApiKey.Name" xml:space="preserve">
<value>txtUpleaApiKey</value>
</data>
<data name="&gt;&gt;txtUpleaApiKey.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;txtUpleaApiKey.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;txtUpleaApiKey.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;txtUpleaEmailAddress.Name" xml:space="preserve">
<value>txtUpleaEmailAddress</value>
</data>
<data name="&gt;&gt;txtUpleaEmailAddress.Parent" xml:space="preserve">
<value>gbUpleaUserInformation</value>
</data>
<data name="&gt;&gt;txtUpleaEmailAddress.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;txtUpleaEmailAddress.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;txtUpleaPassword.Name" xml:space="preserve">
<value>txtUpleaPassword</value>
</data>
<data name="&gt;&gt;txtUpleaPassword.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;txtUpleaPassword.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;txtUpleaPassword.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;txtUpleaUsername.Name" xml:space="preserve">
<value>txtUpleaUsername</value>
</data>
<data name="&gt;&gt;txtUpleaUsername.Parent" xml:space="preserve">
<value>gbUpleaLoginCredentials</value>
</data>
<data name="&gt;&gt;txtUpleaUsername.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;txtUpleaUsername.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="btnUpleaLogin.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnUpleaLogin.Location" type="System.Drawing.Point, System.Drawing">
<value>81, 104</value>
</data>
<data name="btnUpleaLogin.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnUpleaLogin.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="btnUpleaLogin.Text" xml:space="preserve">
<value>Login</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>102, 68</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>151, 17</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="cbUpleaInstantDownloadEnabled.Text" xml:space="preserve">
<value>Instant Download Enabled</value>
</data>
<data name="cbUpleaIsPremium.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbUpleaIsPremium.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="cbUpleaIsPremium.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbUpleaIsPremium.Location" type="System.Drawing.Point, System.Drawing">
<value>102, 45</value>
</data>
<data name="cbUpleaIsPremium.Size" type="System.Drawing.Size, System.Drawing">
<value>118, 17</value>
</data>
<data name="cbUpleaIsPremium.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="cbUpleaIsPremium.Text" xml:space="preserve">
<value>Is Premium Member</value>
</data>
<data name="gbUpleaLoginCredentials.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 14</value>
</data>
<data name="gbUpleaLoginCredentials.Size" type="System.Drawing.Size, System.Drawing">
<value>428, 145</value>
</data>
<data name="gbUpleaLoginCredentials.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="gbUpleaLoginCredentials.Text" xml:space="preserve">
<value>Login Credentials</value>
</data>
<data name="gbUpleaUserInformation.Location" type="System.Drawing.Point, System.Drawing">
<value>450, 14</value>
</data>
<data name="gbUpleaUserInformation.Size" type="System.Drawing.Size, System.Drawing">
<value>350, 107</value>
</data>
<data name="gbUpleaUserInformation.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="gbUpleaUserInformation.Text" xml:space="preserve">
<value>User Information</value>
</data>
<data name="lblUpleaApiKey.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblUpleaApiKey.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblUpleaApiKey.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 81</value>
</data>
<data name="lblUpleaApiKey.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 13</value>
</data>
<data name="lblUpleaApiKey.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="lblUpleaApiKey.Text" xml:space="preserve">
<value>API Key: </value>
</data>
<data name="lblUpleaPassword.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblUpleaPassword.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblUpleaPassword.Location" type="System.Drawing.Point, System.Drawing">
<value>19, 55</value>
</data>
<data name="lblUpleaPassword.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 13</value>
</data>
<data name="lblUpleaPassword.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="lblUpleaPassword.Text" xml:space="preserve">
<value>Password:</value>
</data>
<data name="lblUpleaUsername.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblUpleaUsername.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblUpleaUsername.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 29</value>
</data>
<data name="lblUpleaUsername.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="lblUpleaUsername.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="lblUpleaUsername.Text" xml:space="preserve">
<value>Username:</value>
</data>
<data name="txtUpleaApiKey.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="txtUpleaApiKey.Location" type="System.Drawing.Point, System.Drawing">
<value>81, 78</value>
</data>
<data name="txtUpleaApiKey.Size" type="System.Drawing.Size, System.Drawing">
<value>307, 20</value>
</data>
<data name="txtUpleaApiKey.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="txtUpleaEmailAddress.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="txtUpleaEmailAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>102, 19</value>
</data>
<data name="txtUpleaEmailAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>242, 20</value>
</data>
<data name="txtUpleaEmailAddress.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="txtUpleaPassword.Location" type="System.Drawing.Point, System.Drawing">
<value>81, 52</value>
</data>
<data name="txtUpleaPassword.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
<value>*</value>
</data>
<data name="txtUpleaPassword.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 20</value>
</data>
<data name="txtUpleaPassword.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="txtUpleaUsername.Location" type="System.Drawing.Point, System.Drawing">
<value>81, 26</value>
</data>
<data name="txtUpleaUsername.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 20</value>
</data>
<data name="txtUpleaUsername.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="tpUplea.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 40</value>
</data>
<data name="tpUplea.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpUplea.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 475</value>
</data>
<data name="tpUplea.TabIndex" type="System.Int32, mscorlib">
<value>27</value>
</data>
<data name="tpUplea.Text" xml:space="preserve">
<value>Uplea</value>
</data>
<data name="lblUpleaEmailAddress.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblUpleaEmailAddress.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblUpleaEmailAddress.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 22</value>
</data>
<data name="lblUpleaEmailAddress.Size" type="System.Drawing.Size, System.Drawing">
<value>79, 13</value>
</data>
<data name="lblUpleaEmailAddress.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="lblUpleaEmailAddress.Text" xml:space="preserve">
<value>Email Address: </value>
</data>
<data name="&gt;&gt;lblUpleaEmailAddress.Name" xml:space="preserve">
<value>lblUpleaEmailAddress</value>
</data>
<data name="&gt;&gt;lblUpleaEmailAddress.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;lblUpleaEmailAddress.Parent" xml:space="preserve">
<value>gbUpleaUserInformation</value>
</data>
<data name="&gt;&gt;lblUpleaEmailAddress.ZOrder" xml:space="preserve">
<value>0</value>
</data>
</root>

View file

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

View file

@ -392,4 +392,7 @@ Created folders:</value>
<data name="server_network" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\server-network.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Uplea" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\Uplea.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -150,6 +150,7 @@
<Compile Include="FileUploaders\SharedFolderUploader.cs" />
<Compile Include="FileUploaders\Transfersh.cs" />
<Compile Include="FileUploaders\Uguu.cs" />
<Compile Include="FileUploaders\Uplea.cs" />
<Compile Include="FileUploaders\VideoBin.cs" />
<Compile Include="Forms\OCRSpaceForm.cs">
<SubType>Form</SubType>
@ -880,6 +881,9 @@
<ItemGroup>
<Analyzer Include="..\packages\AWSSDK.S3.3.1.9.0\analyzers\dotnet\cs\AWSSDK.S3.CodeAnalysis.dll" />
</ItemGroup>
<ItemGroup>
<Content Include="Favicons\Uplea.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<PropertyGroup>

View file

@ -286,6 +286,15 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public string StreamablePassword = "";
public bool StreamableUseDirectURL = false;
// Uplea
public string UpleaApiKey = string.Empty;
public string UpleaUsername = string.Empty;
public string UpleaPassword = string.Empty;
public string UpleaEmailAddress = string.Empty;
public bool UpleaIsPremiumMember = false;
public bool UpleaInstantDownloadEnabled = false;
#endregion File uploaders
#region URL shorteners