Updated Lithiio request URL, changed get API key link

This commit is contained in:
Jaex 2017-11-10 21:18:25 +03:00
parent 7648485341
commit a7aea349cf
4 changed files with 57 additions and 64 deletions

View file

@ -62,13 +62,12 @@ public Lithiio(LithiioSettings config)
Config = config;
}
private const string uploadUrl = "http://api.lithi.io/v3/";
public override UploadResult Upload(Stream stream, string fileName)
{
Dictionary<string, string> arguments = new Dictionary<string, string>();
arguments.Add("key", Config.UserAPIKey);
UploadResult result = SendRequestFile(uploadUrl, stream, fileName, "file", arguments);
UploadResult result = SendRequestFile("https://upload.lithi.io/v1.php", stream, fileName, "file", arguments);
if (result.IsSuccess)
{

View file

@ -437,7 +437,6 @@ private void InitializeComponent()
this.lblStreamablePassword = new System.Windows.Forms.Label();
this.cbStreamableAnonymous = new System.Windows.Forms.CheckBox();
this.tpSul = new System.Windows.Forms.TabPage();
this.sulKeyLink = new System.Windows.Forms.LinkLabel();
this.txtSulAPIKey = new System.Windows.Forms.TextBox();
this.lblSulAPIKey = new System.Windows.Forms.Label();
this.tpLithiio = new System.Windows.Forms.TabPage();
@ -618,6 +617,7 @@ private void InitializeComponent()
this.lblWidthHint = new System.Windows.Forms.Label();
this.ttlvMain = new ShareX.HelpersLib.TabToListView();
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.btnSulGetAPIKey = new System.Windows.Forms.Button();
this.tpOtherUploaders.SuspendLayout();
this.tcOtherUploaders.SuspendLayout();
this.tpTwitter.SuspendLayout();
@ -3704,20 +3704,13 @@ private void InitializeComponent()
//
// tpSul
//
this.tpSul.Controls.Add(this.sulKeyLink);
this.tpSul.Controls.Add(this.btnSulGetAPIKey);
this.tpSul.Controls.Add(this.txtSulAPIKey);
this.tpSul.Controls.Add(this.lblSulAPIKey);
resources.ApplyResources(this.tpSul, "tpSul");
this.tpSul.Name = "tpSul";
this.tpSul.UseVisualStyleBackColor = true;
//
// sulKeyLink
//
resources.ApplyResources(this.sulKeyLink, "sulKeyLink");
this.sulKeyLink.Name = "sulKeyLink";
this.sulKeyLink.TabStop = true;
this.sulKeyLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.sulKeyLink_LinkClicked);
//
// txtSulAPIKey
//
resources.ApplyResources(this.txtSulAPIKey, "txtSulAPIKey");
@ -5034,6 +5027,13 @@ private void InitializeComponent()
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
//
// btnSulGetAPIKey
//
resources.ApplyResources(this.btnSulGetAPIKey, "btnSulGetAPIKey");
this.btnSulGetAPIKey.Name = "btnSulGetAPIKey";
this.btnSulGetAPIKey.UseVisualStyleBackColor = true;
this.btnSulGetAPIKey.Click += new System.EventHandler(this.btnSulGetAPIKey_Click);
//
// UploadersConfigForm
//
resources.ApplyResources(this, "$this");
@ -5782,7 +5782,6 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtSFTPKeyPassphrase;
private System.Windows.Forms.Button btnSFTPKeyLocationBrowse;
private System.Windows.Forms.Label lblSFTPKeyPassphrase;
private System.Windows.Forms.LinkLabel sulKeyLink;
private System.Windows.Forms.Button btnCustomUploaderDuplicate;
private System.Windows.Forms.Panel pCustomUploader;
private System.Windows.Forms.Button btnCustomUploaderURLSharingServiceTest;
@ -5795,5 +5794,6 @@ private void InitializeComponent()
private System.Windows.Forms.Button btnPaste_eeGetUserKey;
private OAuthControl oauthFlickr;
private System.Windows.Forms.CheckBox cbFlickrDirectLink;
private System.Windows.Forms.Button btnSulGetAPIKey;
}
}

View file

@ -2461,20 +2461,6 @@ private void cbLambdaUploadURL_SelectedIndexChanged(object sender, EventArgs e)
#endregion Lambda
#region Lithiio
private void btnLithiioGetAPIKey_Click(object sender, EventArgs e)
{
URLHelpers.OpenURL("https://lithi.io/");
}
private void txtLithiioApiKey_TextChanged(object sender, EventArgs e)
{
Config.LithiioSettings.UserAPIKey = txtLithiioApiKey.Text;
}
#endregion Lithiio
#region Pomf
private void cbPomfUploaders_SelectedIndexChanged(object sender, EventArgs e)
@ -2528,20 +2514,6 @@ private void txtPomfResultURL_TextChanged(object sender, EventArgs e)
#endregion Pomf
#region Sul
private void txtSulAPIKey_TextChanged(object sender, EventArgs e)
{
Config.SulAPIKey = txtSulAPIKey.Text;
}
private void sulKeyLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
URLHelpers.OpenURL("https://s-ul.eu/account/info");
}
#endregion Sul
#region Seafile
private void cbSeafileAPIURL_TextChanged(object sender, EventArgs e)
@ -2814,6 +2786,34 @@ private void cbStreamableUseDirectURL_CheckedChanged(object sender, EventArgs e)
#endregion Streamable
#region Sul
private void txtSulAPIKey_TextChanged(object sender, EventArgs e)
{
Config.SulAPIKey = txtSulAPIKey.Text;
}
private void btnSulGetAPIKey_Click(object sender, EventArgs e)
{
URLHelpers.OpenURL("https://s-ul.eu/account/info");
}
#endregion Sul
#region Lithiio
private void txtLithiioApiKey_TextChanged(object sender, EventArgs e)
{
Config.LithiioSettings.UserAPIKey = txtLithiioApiKey.Text;
}
private void btnLithiioGetAPIKey_Click(object sender, EventArgs e)
{
URLHelpers.OpenURL("https://lithi.io/my-account.php");
}
#endregion Lithiio
#region Azure Storage
private void txtAzureStorageAccountName_TextChanged(object sender, EventArgs e)

View file

@ -10562,41 +10562,35 @@ Using an encrypted library disables sharing.</value>
<data name="&gt;&gt;tpStreamable.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="sulKeyLink.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
<data name="btnSulGetAPIKey.Location" type="System.Drawing.Point, System.Drawing">
<value>424, 31</value>
</data>
<data name="sulKeyLink.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<data name="btnSulGetAPIKey.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 23</value>
</data>
<data name="sulKeyLink.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 59</value>
</data>
<data name="sulKeyLink.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 13</value>
</data>
<data name="sulKeyLink.TabIndex" type="System.Int32, mscorlib">
<data name="btnSulGetAPIKey.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="sulKeyLink.Text" xml:space="preserve">
<value>Click here to get your API key!</value>
<data name="btnSulGetAPIKey.Text" xml:space="preserve">
<value>Get API key...</value>
</data>
<data name="&gt;&gt;sulKeyLink.Name" xml:space="preserve">
<value>sulKeyLink</value>
<data name="&gt;&gt;btnSulGetAPIKey.Name" xml:space="preserve">
<value>btnSulGetAPIKey</value>
</data>
<data name="&gt;&gt;sulKeyLink.Type" xml:space="preserve">
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="&gt;&gt;btnSulGetAPIKey.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;sulKeyLink.Parent" xml:space="preserve">
<data name="&gt;&gt;btnSulGetAPIKey.Parent" xml:space="preserve">
<value>tpSul</value>
</data>
<data name="&gt;&gt;sulKeyLink.ZOrder" xml:space="preserve">
<data name="&gt;&gt;btnSulGetAPIKey.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtSulAPIKey.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 32</value>
</data>
<data name="txtSulAPIKey.Size" type="System.Drawing.Size, System.Drawing">
<value>409, 20</value>
<value>400, 20</value>
</data>
<data name="txtSulAPIKey.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
@ -10674,10 +10668,10 @@ Using an encrypted library disables sharing.</value>
<value>NoControl</value>
</data>
<data name="btnLithiioGetAPIKey.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 31</value>
<value>424, 31</value>
</data>
<data name="btnLithiioGetAPIKey.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 23</value>
<value>160, 23</value>
</data>
<data name="btnLithiioGetAPIKey.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
@ -10731,7 +10725,7 @@ Using an encrypted library disables sharing.</value>
<value>16, 32</value>
</data>
<data name="txtLithiioApiKey.Size" type="System.Drawing.Size, System.Drawing">
<value>344, 20</value>
<value>400, 20</value>
</data>
<data name="txtLithiioApiKey.TabIndex" type="System.Int32, mscorlib">
<value>6</value>