diff --git a/ShareX.UploadersLib/Enums.cs b/ShareX.UploadersLib/Enums.cs
index 3370fcd12..43c861e85 100644
--- a/ShareX.UploadersLib/Enums.cs
+++ b/ShareX.UploadersLib/Enums.cs
@@ -154,6 +154,8 @@ public enum UrlShortenerType
NLCM,
[Description("adf.ly")]
AdFly,
+ [Description("lnku.co")]
+ LnkU,
CustomURLShortener // Localized
}
diff --git a/ShareX.UploadersLib/Favicons/LnkU.ico b/ShareX.UploadersLib/Favicons/LnkU.ico
new file mode 100644
index 000000000..1c12613a7
Binary files /dev/null and b/ShareX.UploadersLib/Favicons/LnkU.ico differ
diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs
index 616b4da18..9564856e7 100644
--- a/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs
+++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs
@@ -433,6 +433,9 @@ private void InitializeComponent()
this.atcGoogleURLShortenerAccountType = new ShareX.UploadersLib.AccountTypeControl();
this.oauthTwitter = new ShareX.UploadersLib.OAuthControl();
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
+ this.tpLnkU = new System.Windows.Forms.TabPage();
+ this.txtLnkUAPIKEY = new System.Windows.Forms.TextBox();
+ this.lblLnkUAPIKey = new System.Windows.Forms.Label();
this.tpOtherUploaders.SuspendLayout();
this.tcOtherUploaders.SuspendLayout();
this.tpTwitter.SuspendLayout();
@@ -495,6 +498,7 @@ private void InitializeComponent()
this.tpPicasa.SuspendLayout();
this.tpChevereto.SuspendLayout();
this.tcUploaders.SuspendLayout();
+ this.tpLnkU.SuspendLayout();
this.SuspendLayout();
//
// txtRapidSharePremiumUserName
@@ -1059,6 +1063,7 @@ private void InitializeComponent()
this.tcURLShorteners.Controls.Add(this.tpGoogleURLShortener);
this.tcURLShorteners.Controls.Add(this.tpYourls);
this.tcURLShorteners.Controls.Add(this.tpAdFly);
+ this.tcURLShorteners.Controls.Add(this.tpLnkU);
resources.ApplyResources(this.tcURLShorteners, "tcURLShorteners");
this.tcURLShorteners.Name = "tcURLShorteners";
this.tcURLShorteners.SelectedIndex = 0;
@@ -3415,15 +3420,25 @@ private void InitializeComponent()
this.oauth2GoogleURLShortener.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauth2GoogleURLShortener_CompleteButtonClicked);
this.oauth2GoogleURLShortener.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauth2GoogleURLShortener_ClearButtonClicked);
this.oauth2GoogleURLShortener.RefreshButtonClicked += new ShareX.UploadersLib.OAuthControl.RefreshButtonClickedEventHandler(this.oauth2GoogleURLShortener_RefreshButtonClicked);
+ // tpLnkU
//
// atcGoogleURLShortenerAccountType
+ this.tpLnkU.Controls.Add(this.txtLnkUAPIKEY);
+ this.tpLnkU.Controls.Add(this.lblLnkUAPIKey);
+ resources.ApplyResources(this.tpLnkU, "tpLnkU");
+ this.tpLnkU.Name = "tpLnkU";
+ this.tpLnkU.UseVisualStyleBackColor = true;
//
resources.ApplyResources(this.atcGoogleURLShortenerAccountType, "atcGoogleURLShortenerAccountType");
this.atcGoogleURLShortenerAccountType.Name = "atcGoogleURLShortenerAccountType";
this.atcGoogleURLShortenerAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
this.atcGoogleURLShortenerAccountType.AccountTypeChanged += new ShareX.UploadersLib.AccountTypeControl.AccountTypeChangedEventHandler(this.atcGoogleURLShortenerAccountType_AccountTypeChanged);
+ // txtLnkUAPIKEY
//
// oauthTwitter
+ resources.ApplyResources(this.txtLnkUAPIKEY, "txtLnkUAPIKEY");
+ this.txtLnkUAPIKEY.Name = "txtLnkUAPIKEY";
+ this.txtLnkUAPIKEY.TextChanged += new System.EventHandler(this.txtLnkUAPIKEY_TextChanged);
//
resources.ApplyResources(this.oauthTwitter, "oauthTwitter");
this.oauthTwitter.IsRefreshable = false;
@@ -3431,12 +3446,15 @@ private void InitializeComponent()
this.oauthTwitter.OpenButtonClicked += new ShareX.UploadersLib.OAuthControl.OpenButtonClickedEventHandler(this.oauthTwitter_OpenButtonClicked);
this.oauthTwitter.CompleteButtonClicked += new ShareX.UploadersLib.OAuthControl.CompleteButtonClickedEventHandler(this.oauthTwitter_CompleteButtonClicked);
this.oauthTwitter.ClearButtonClicked += new ShareX.UploadersLib.OAuthControl.ClearButtonclickedEventHandler(this.oauthTwitter_ClearButtonClicked);
+ // lblLnkUAPIKey
//
// actRapidShareAccountType
//
resources.ApplyResources(this.actRapidShareAccountType, "actRapidShareAccountType");
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
+ resources.ApplyResources(this.lblLnkUAPIKey, "lblLnkUAPIKey");
+ this.lblLnkUAPIKey.Name = "lblLnkUAPIKey";
//
// UploadersConfigForm
//
@@ -3557,6 +3575,8 @@ private void InitializeComponent()
this.tpChevereto.ResumeLayout(false);
this.tpChevereto.PerformLayout();
this.tcUploaders.ResumeLayout(false);
+ this.tpLnkU.ResumeLayout(false);
+ this.tpLnkU.PerformLayout();
this.ResumeLayout(false);
}
@@ -3965,6 +3985,9 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtUp1Key;
private System.Windows.Forms.TextBox txtUp1Host;
private System.Windows.Forms.Label lblUp1Key;
- private System.Windows.Forms.Label lblUp1Host;
+ private System.Windows.Forms.Label lblUp1Host;
+ private System.Windows.Forms.TabPage tpLnkU;
+ private System.Windows.Forms.TextBox txtLnkUAPIKEY;
+ private System.Windows.Forms.Label lblLnkUAPIKey;
}
}
\ No newline at end of file
diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs
index 87ea0d04d..9af85f195 100644
--- a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs
+++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs
@@ -95,6 +95,7 @@ private void FormSettings()
AddIconToTab(tpImageShack, Resources.ImageShack);
AddIconToTab(tpImgur, Resources.Imgur);
AddIconToTab(tpJira, Resources.jira);
+ AddIconToTab(tpLnkU, Resources.LnkU);
AddIconToTab(tpMediaFire, Resources.MediaFire);
AddIconToTab(tpMega, Resources.Mega);
AddIconToTab(tpMinus, Resources.Minus);
@@ -582,6 +583,10 @@ public void LoadSettings(UploadersConfig uploadersConfig)
txtAdflyAPIKEY.Text = Config.AdFlyAPIKEY;
txtAdflyAPIUID.Text = Config.AdFlyAPIUID;
+ // lnku.co
+
+ txtLnkUAPIKEY.Text = Config.LnkUAPIKEY;
+
#endregion URL Shorteners
#region Other Services
@@ -2133,6 +2138,14 @@ private void llAdflyLink_LinkClicked(object sender, LinkLabelLinkClickedEventArg
#endregion adf.ly
+ #region LnkU.co
+
+ private void txtLnkUAPIKEY_TextChanged(object sender, EventArgs e)
+ {
+ Config.LnkUAPIKEY = txtLnkUAPIKEY.Text;
+ }
+ #endregion
+
#endregion URL Shorteners
#region Other Uploaders
diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.resx b/ShareX.UploadersLib/Forms/UploadersConfigForm.resx
index 8aa65950a..5ee8a6e83 100644
--- a/ShareX.UploadersLib/Forms/UploadersConfigForm.resx
+++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.resx
@@ -462,7 +462,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Twitter
- @Invariant
+
tpTwitter
@@ -1485,7 +1485,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
- @Invariant
+
txtCustomUploaderLog
@@ -1647,7 +1647,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
URL:
- @Invariant
+
lblCustomUploaderURL
@@ -2004,7 +2004,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
bit.ly
- @Invariant
+
tpBitly
@@ -2073,7 +2073,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Google
- @Invariant
+
tpGoogleURLShortener
@@ -2307,7 +2307,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
API URL:
- @Invariant
+
lblYourlsAPIURL
@@ -2334,7 +2334,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
YOURLS
- @Invariant
+
tpYourls
@@ -2415,7 +2415,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
API UID:
- @Invariant
+
lblAdflyAPIUID
@@ -2493,7 +2493,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
adf.ly
- @Invariant
+
tpAdFly
@@ -2506,6 +2506,81 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
3
+
+ 16, 38
+
+
+ 224, 20
+
+
+ 7
+
+
+ txtLnkUAPIKEY
+
+
+ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tpLnkU
+
+
+ 0
+
+
+ True
+
+
+ NoControl
+
+
+ 13, 22
+
+
+ 47, 13
+
+
+ 6
+
+
+ API key:
+
+
+ lblLnkUAPIKey
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tpLnkU
+
+
+ 1
+
+
+ 4, 22
+
+
+ 972, 493
+
+
+ 4
+
+
+ LnkU.co
+
+
+ tpLnkU
+
+
+ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tcURLShorteners
+
+
+ 4
+
Fill
@@ -2799,7 +2874,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
FTP
- @Invariant
+
tpFTP
@@ -3169,20 +3244,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
8
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
0
Dropbox
- @Invariant
+
tpDropbox
@@ -3301,20 +3376,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
3
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
17
OneDrive
- @Invariant
+
tpOneDrive
@@ -3523,20 +3598,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
6
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
1
Google Drive
- @Invariant
+
tpGoogleDrive
@@ -3718,20 +3793,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
5
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
2
Box
- @Invariant
+
tpBox
@@ -4012,20 +4087,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
6
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
0
Copy
- @Invariant
+
tpCopy
@@ -4207,20 +4282,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
5
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
19
hubiC
- @Invariant
+
tpHubic
@@ -4328,7 +4403,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
...
- @Invariant
+
btnAmazonS3BucketNameOpen
@@ -4355,7 +4430,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
...
- @Invariant
+
btnAmazonS3AccessKeyOpen
@@ -4624,20 +4699,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
16
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
13
Amazon S3
- @Invariant
+
tpAmazonS3
@@ -4945,17 +5020,17 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
10
- 4, 22
+ 4, 40
- 972, 493
+ 972, 475
12
Mega
- @Invariant
+
tpMega
@@ -5263,20 +5338,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
10
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
15
ownCloud
- @Invariant
+
tpOwnCloud
@@ -5476,20 +5551,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
6
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
16
MediaFire
- @Invariant
+
tpMediaFire
@@ -5638,20 +5713,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
4
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
14
Pushbullet
- @Invariant
+
tpPushbullet
@@ -5815,20 +5890,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
5
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
6
SendSpace
- @Invariant
+
tpSendSpace
@@ -6001,20 +6076,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
5
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
7
Ge.tt
- @Invariant
+
tpGe_tt
@@ -6160,20 +6235,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
4
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
8
Hostr
- @Invariant
+
tpHostr
@@ -6610,20 +6685,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
3
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
3
Minus
- @Invariant
+
tpMinus
@@ -6647,7 +6722,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
PROJECT-
- @Invariant
+
txtJiraIssuePrefix
@@ -6731,7 +6806,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
http://
- @Invariant
+
txtJiraHost
@@ -6820,17 +6895,17 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
3
- 4, 22
+ 4, 40
- 972, 493
+ 972, 475
11
Atlassian Jira
- @Invariant
+
tpJira
@@ -6925,20 +7000,20 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
2
- 4, 22
+ 4, 40
3, 3, 3, 3
- 972, 493
+ 972, 475
20
Lambda
- @Invariant
+
tpLambda
@@ -7079,7 +7154,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Up1
- @Invariant
+
tpUp1
@@ -8171,7 +8246,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Pastebin
- @Invariant
+
tpPastebin
@@ -8249,7 +8324,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Paste.ee
- @Invariant
+
tpPaste_ee
@@ -8348,7 +8423,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Gist
- @Invariant
+
tpGist
@@ -8456,7 +8531,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
uPaste
- @Invariant
+
tpUpaste
@@ -8585,7 +8660,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Hastebin
- @Invariant
+
tpHastebin
@@ -8753,7 +8828,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
ID
- @Invariant
+
Title
@@ -8882,7 +8957,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Imgur
- @Invariant
+
tpImgur
@@ -9122,7 +9197,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
ImageShack
- @Invariant
+
tpImageShack
@@ -9326,7 +9401,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
TinyPic
- @Invariant
+
tpTinyPic
@@ -9506,7 +9581,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Flickr
- @Invariant
+
tpFlickr
@@ -9998,7 +10073,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Photobucket
- @Invariant
+
tpPhotobucket
@@ -10064,7 +10139,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
ID
- @Invariant
+
135
@@ -10166,7 +10241,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Picasa
- @Invariant
+
tpPicasa
@@ -10226,7 +10301,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
/api/1/upload
- @Invariant
+
lblCheveretoWebsiteTip
@@ -10355,7 +10430,7 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
Chevereto
- @Invariant
+
tpChevereto
@@ -10530,9 +10605,6 @@ For example, if your bucket is called bucket.example.com then URL will be http:/
1000, 557
-
- NoControl
-
840, 572
diff --git a/ShareX.UploadersLib/Properties/Resources.Designer.cs b/ShareX.UploadersLib/Properties/Resources.Designer.cs
index 2a4013038..7c871da52 100644
--- a/ShareX.UploadersLib/Properties/Resources.Designer.cs
+++ b/ShareX.UploadersLib/Properties/Resources.Designer.cs
@@ -421,6 +421,16 @@ internal class Resources {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
+ ///
+ internal static System.Drawing.Icon LnkU {
+ get {
+ object obj = ResourceManager.GetObject("LnkU", resourceCulture);
+ return ((System.Drawing.Icon)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/ShareX.UploadersLib/Properties/Resources.resx b/ShareX.UploadersLib/Properties/Resources.resx
index df4cd2c1f..44bad0af8 100644
--- a/ShareX.UploadersLib/Properties/Resources.resx
+++ b/ShareX.UploadersLib/Properties/Resources.resx
@@ -461,4 +461,7 @@ Created folders:
..\Favicons\hubic.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Favicons\LnkU.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/ShareX.UploadersLib/ShareX.UploadersLib.csproj b/ShareX.UploadersLib/ShareX.UploadersLib.csproj
index 39bf84235..8d50483ae 100644
--- a/ShareX.UploadersLib/ShareX.UploadersLib.csproj
+++ b/ShareX.UploadersLib/ShareX.UploadersLib.csproj
@@ -289,6 +289,7 @@
+
@@ -745,6 +746,10 @@
+
+
+
+
diff --git a/ShareX.UploadersLib/URLShorteners/LnkUURLShortener.cs b/ShareX.UploadersLib/URLShorteners/LnkUURLShortener.cs
new file mode 100644
index 000000000..36daf4c53
--- /dev/null
+++ b/ShareX.UploadersLib/URLShorteners/LnkUURLShortener.cs
@@ -0,0 +1,69 @@
+#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 .
+*/
+
+#endregion License Information (GPL v3)
+
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace ShareX.UploadersLib.URLShorteners
+{
+ public sealed class LnkUURLShortener : URLShortener
+ {
+ private const string API_ENDPOINT = "http://lnku.co/api/go/";
+ public string API_KEY { get; set; }
+
+ public override UploadResult ShortenURL(string url)
+ {
+ UploadResult result = new UploadResult { URL = url };
+
+ Dictionary args = new Dictionary();
+ args.Add("apikey", API_KEY);
+ args.Add("action", "shorten");
+ args.Add("fullurl", url);
+
+ string response = SendRequest(HttpMethod.GET, API_ENDPOINT, args);
+
+ if (!string.IsNullOrEmpty(response))
+ {
+ LnkUURLShortenerResponse jsonResponse = JsonConvert.DeserializeObject(response);
+
+ if (jsonResponse != null)
+ {
+ result.ShortenedURL = jsonResponse.shorturl;
+ }
+ }
+
+ return result;
+ }
+ }
+
+ public class LnkUURLShortenerResponse
+ {
+ public string shortcode { get; set; }
+ public string site { get; set; }
+ public string shorturl { get; set; }
+ public string fullurl { get; set; }
+ public string title { get; set; }
+ }
+}
diff --git a/ShareX.UploadersLib/UploadersConfig.cs b/ShareX.UploadersLib/UploadersConfig.cs
index d5c854f55..c6d486178 100644
--- a/ShareX.UploadersLib/UploadersConfig.cs
+++ b/ShareX.UploadersLib/UploadersConfig.cs
@@ -275,6 +275,9 @@ public class UploadersConfig : SettingsBase
public string AdFlyAPIKEY = String.Empty;
public string AdFlyAPIUID = String.Empty;
+ // lnku.co
+ public string LnkUAPIKEY = string.Empty;
+
#endregion URL shorteners
#region URL sharing services
@@ -428,6 +431,8 @@ public bool IsValid(UrlShortenerType destination)
return !string.IsNullOrEmpty(YourlsAPIURL) && (!string.IsNullOrEmpty(YourlsSignature) || (!string.IsNullOrEmpty(YourlsUsername) && !string.IsNullOrEmpty(YourlsPassword)));
case UrlShortenerType.AdFly:
return !string.IsNullOrEmpty(AdFlyAPIKEY) && !string.IsNullOrEmpty(AdFlyAPIUID);
+ case UrlShortenerType.LnkU:
+ return !string.IsNullOrEmpty(LnkUAPIKEY);
case UrlShortenerType.CustomURLShortener:
return CustomUploadersList != null && CustomUploadersList.IsValidIndex(CustomURLShortenerSelected);
}
diff --git a/ShareX/UploadTask.cs b/ShareX/UploadTask.cs
index 0a34c6fa4..ac62f6572 100644
--- a/ShareX/UploadTask.cs
+++ b/ShareX/UploadTask.cs
@@ -1075,6 +1075,12 @@ public UploadResult ShortenURL(string url)
APIUID = Program.UploadersConfig.AdFlyAPIUID
};
break;
+ case UrlShortenerType.LnkU:
+ urlShortener = new LnkUURLShortener
+ {
+ API_KEY = Program.UploadersConfig.LnkUAPIKEY
+ };
+ break;
case UrlShortenerType.CustomURLShortener:
CustomUploaderItem customUploader = GetCustomUploader(Program.UploadersConfig.CustomURLShortenerSelected);
if (customUploader != null)