Added Plik file uploader

This commit is contained in:
Max Schmitt 2017-02-26 17:17:02 +01:00
parent 4261431d2d
commit bcac721a25
9 changed files with 1033 additions and 0 deletions

View file

@ -145,6 +145,8 @@ public enum FileDestination
Transfersh,
[Description("Uplea")]
Uplea,
[Description("Plik")]
Plik,
SharedFolder, // Localized
Email, // Localized
CustomFileUploader // Localized

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,229 @@
using Newtonsoft.Json;
using ShareX.HelpersLib;
using ShareX.UploadersLib.Properties;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace ShareX.UploadersLib.FileUploaders
{
public class PlikFileUploaderService : FileUploaderService
{
public override FileDestination EnumValue { get; } = FileDestination.Plik;
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{
return new Plik(config.PlikURL, config.PlikAPIKey)
{
APIKey = config.PlikAPIKey,
Removable = config.PlikRemovable,
OneShot = config.PlikOneShot,
hasComment = config.PlikhasComment,
Comment = config.PlikComment,
isSecured = config.PlikIsSecured,
Login = config.PlikLogin,
Password = config.PlikPassword,
TTL = config.PlikTTL,
TTLUnit = config.PlikTTLUnit
};
}
public override bool CheckConfig(UploadersConfig config)
{
Regex APIrgx = new Regex(@"^([0-9A-Fa-f]{8}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{4}[-][0-9A-Fa-f]{12})$");
Regex URLrgex = new Regex(@"^http(s)?://([\w-]+.)+[\w-]+(/[\w- ./?%&=])?$");
return URLrgex.IsMatch(config.PlikURL) && APIrgx.IsMatch(config.PlikAPIKey);
}
public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpPlik;
public override Icon ServiceIcon => Resources.Plik;
}
public sealed class Plik : FileUploader
{
public string URL { get; set; }
public string APIKey { get; set; }
public bool OneShot { get; set; }
public bool Removable { get; set; }
public bool isSecured { get; set; }
public string Login { get; set; }
public string Password { get; set; }
public bool hasComment { get; set; }
public string Comment { get; set; }
public decimal TTL { get; set; }
public int TTLUnit { get; set; }
public Plik(string url, string apikey)
{
URL = url;
APIKey = apikey;
}
public override UploadResult Upload(Stream stream, string fileName)
{
if (string.IsNullOrEmpty(URL))
{
throw new Exception("Plik Host is empty.");
}
NameValueCollection requestHeaders = new NameValueCollection();
requestHeaders["X-PlikToken"] = APIKey;
UploadMetadataRequest metaDataReq = new UploadMetadataRequest();
metaDataReq.Files = new UploadMetadataRequestFile0();
metaDataReq.Files.File0 = new UploadMetadataRequestFile();
metaDataReq.Files.File0.FileName = fileName;
metaDataReq.Files.File0.FileType = Helpers.GetMimeType(fileName);
metaDataReq.Files.File0.FileSize = Convert.ToInt32(stream.Length);
metaDataReq.Removable = Removable;
metaDataReq.OneShot = OneShot;
metaDataReq.Ttl = Convert.ToInt32(GetMultiplyIndex(2, TTLUnit) * TTL * 60);
if (hasComment)
{
metaDataReq.Comment = Comment;
}
if (isSecured)
{
metaDataReq.Login = Login;
metaDataReq.Password = Password;
}
string metaDataResp = SendRequest(HttpMethod.POST, URL + "/upload", JsonConvert.SerializeObject(metaDataReq), headers: requestHeaders);
UploadMetadataResponse metaData = JsonConvert.DeserializeObject<UploadMetadataResponse>(metaDataResp);
requestHeaders["x-uploadtoken"] = metaData.uploadToken;
string url = $"{URL}/file/{metaData.id}/{metaData.files[getMetaFileKey(metaData)].id.ToString()}/{fileName}";
UploadResult FileDatReq = SendRequestFile(url, stream, fileName, "file", headers: requestHeaders);
return ConvertResult(metaData, FileDatReq);
}
private string getMetaFileKey(UploadMetadataResponse md)
{
string firstElement = "";
foreach (var key in md.files)
{
firstElement = key.Key;
break;
}
return firstElement;
}
private UploadResult ConvertResult(UploadMetadataResponse metaData, UploadResult fileDataReq)
{
UploadResult result = new UploadResult(fileDataReq.Response);
UploadMetadataResponse fileData = JsonConvert.DeserializeObject<UploadMetadataResponse>(fileDataReq.Response);
UploadMetadataResponseFile actFile = metaData.files[getMetaFileKey(metaData)];
result.URL = $"{URL}/file/{metaData.id}/{actFile.id.ToString()}/{actFile.fileName}";
return result;
}
internal static decimal GetMultiplyIndex(int newUnit, int oldUnit)
{
decimal multiplyValue = 1m;
switch (newUnit)
{
case 0: // days
switch (oldUnit)
{
case 1: // hours
multiplyValue = 1m / 24m;
break;
case 2: // minutes
multiplyValue = 1m / 24m / 60m;
break;
}
break;
case 1: // hours
switch (oldUnit)
{
case 0: // days
multiplyValue = 24m;
break;
case 2: // minutes
multiplyValue = 1m / 60m;
break;
}
break;
case 2: // minutes
switch (oldUnit)
{
case 0: // days
multiplyValue = 60m * 24m;
break;
case 1: // hours
multiplyValue = 60m;
break;
}
break;
}
return multiplyValue;
}
}
public class UploadMetadataRequestFile
{
[JsonProperty("fileName")]
public string FileName { get; set; }
[JsonProperty("fileType")]
public string FileType { get; set; }
[JsonProperty("fileSize")]
public int FileSize { get; set; }
}
public class UploadMetadataRequestFile0
{
[JsonProperty("0")]
public UploadMetadataRequestFile File0 { get; set; }
}
public class UploadMetadataRequest
{
[JsonProperty("ttl")]
public int Ttl { get; set; }
[JsonProperty("removable")]
public bool Removable { get; set; }
[JsonProperty("oneShot")]
public bool OneShot { get; set; }
[JsonProperty("comments")]
public string Comment { get; set; }
[JsonProperty("login")]
public string Login { get; set; }
[JsonProperty("password")]
public string Password { get; set; }
[JsonProperty("files")]
public UploadMetadataRequestFile0 Files { get; set; }
}
public class UploadMetadataResponseFile
{
public string id { get; set; }
public string fileName { get; set; }
public string fileMd5 { get; set; }
public string status { get; set; }
public string fileType { get; set; }
public int fileUploadDate { get; set; }
public int fileSize { get; set; }
public string reference { get; set; }
}
public class UploadMetadataResponse
{
public string id { get; set; }
public int uploadDate { get; set; }
public int ttl { get; set; }
public string shortUrl { get; set; }
public string downloadDomain { get; set; }
public string comments { get; set; }
public Dictionary<string, UploadMetadataResponseFile> files { get; set; }
public string uploadToken { get; set; }
public bool admin { get; set; }
public bool stream { get; set; }
public bool oneShot { get; set; }
public bool removable { get; set; }
public bool protectedByPassword { get; set; }
public bool protectedByYubikey { get; set; }
}
}

View file

@ -424,6 +424,25 @@ private void InitializeComponent()
this.nudEmailSmtpPort = new System.Windows.Forms.NumericUpDown();
this.lblEmailSmtpPort = new System.Windows.Forms.Label();
this.txtEmailDefaultSubject = new System.Windows.Forms.TextBox();
this.tpPlik = new System.Windows.Forms.TabPage();
this.gpPlikSettings = new System.Windows.Forms.GroupBox();
this.cbPlikOneShot = new System.Windows.Forms.CheckBox();
this.txtPlikComment = new System.Windows.Forms.TextBox();
this.cbPlikComment = new System.Windows.Forms.CheckBox();
this.cbPlikRemovable = new System.Windows.Forms.CheckBox();
this.gpPlikLoginCredentials = new System.Windows.Forms.GroupBox();
this.nudPlikTTL = new System.Windows.Forms.NumericUpDown();
this.cbxPlikTTLUnit = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.txtPlikURL = new System.Windows.Forms.TextBox();
this.lblPlikURL = new System.Windows.Forms.Label();
this.cbPlikIsSecured = new System.Windows.Forms.CheckBox();
this.lblPlikAPIKey = new System.Windows.Forms.Label();
this.txtPlikAPIKey = new System.Windows.Forms.TextBox();
this.lblPlikPassword = new System.Windows.Forms.Label();
this.lblPlikUsername = new System.Windows.Forms.Label();
this.txtPlikPassword = new System.Windows.Forms.TextBox();
this.txtPlikLogin = new System.Windows.Forms.TextBox();
this.btnCopyShowFiles = new System.Windows.Forms.Button();
this.tpTextUploaders = new System.Windows.Forms.TabPage();
this.tcTextUploaders = new System.Windows.Forms.TabControl();
@ -632,6 +651,10 @@ private void InitializeComponent()
this.tpSharedFolder.SuspendLayout();
this.tpEmail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).BeginInit();
this.tpPlik.SuspendLayout();
this.gpPlikSettings.SuspendLayout();
this.gpPlikLoginCredentials.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPlikTTL)).BeginInit();
this.tpTextUploaders.SuspendLayout();
this.tcTextUploaders.SuspendLayout();
this.tpPastebin.SuspendLayout();
@ -1672,6 +1695,7 @@ private void InitializeComponent()
this.tcFileUploaders.Controls.Add(this.tpUplea);
this.tcFileUploaders.Controls.Add(this.tpSharedFolder);
this.tcFileUploaders.Controls.Add(this.tpEmail);
this.tcFileUploaders.Controls.Add(this.tpPlik);
resources.ApplyResources(this.tcFileUploaders, "tcFileUploaders");
this.tcFileUploaders.Multiline = true;
this.tcFileUploaders.Name = "tcFileUploaders";
@ -3516,6 +3540,155 @@ private void InitializeComponent()
this.txtEmailDefaultSubject.Name = "txtEmailDefaultSubject";
this.txtEmailDefaultSubject.TextChanged += new System.EventHandler(this.txtDefaultSubject_TextChanged);
//
// tpPlik
//
this.tpPlik.Controls.Add(this.gpPlikSettings);
this.tpPlik.Controls.Add(this.gpPlikLoginCredentials);
resources.ApplyResources(this.tpPlik, "tpPlik");
this.tpPlik.Name = "tpPlik";
this.tpPlik.UseVisualStyleBackColor = true;
//
// gpPlikSettings
//
this.gpPlikSettings.Controls.Add(this.cbPlikOneShot);
this.gpPlikSettings.Controls.Add(this.txtPlikComment);
this.gpPlikSettings.Controls.Add(this.cbPlikComment);
this.gpPlikSettings.Controls.Add(this.cbPlikRemovable);
resources.ApplyResources(this.gpPlikSettings, "gpPlikSettings");
this.gpPlikSettings.Name = "gpPlikSettings";
this.gpPlikSettings.TabStop = false;
//
// cbPlikOneShot
//
resources.ApplyResources(this.cbPlikOneShot, "cbPlikOneShot");
this.cbPlikOneShot.Name = "cbPlikOneShot";
this.cbPlikOneShot.UseVisualStyleBackColor = true;
this.cbPlikOneShot.CheckedChanged += new System.EventHandler(this.cbPlikOneShot_CheckedChanged);
//
// txtPlikComment
//
resources.ApplyResources(this.txtPlikComment, "txtPlikComment");
this.txtPlikComment.Name = "txtPlikComment";
this.txtPlikComment.ReadOnly = true;
this.txtPlikComment.TextChanged += new System.EventHandler(this.txtPlikComment_TextChanged);
//
// cbPlikComment
//
resources.ApplyResources(this.cbPlikComment, "cbPlikComment");
this.cbPlikComment.Name = "cbPlikComment";
this.cbPlikComment.UseVisualStyleBackColor = true;
this.cbPlikComment.CheckedChanged += new System.EventHandler(this.cbPlikComment_CheckedChanged);
//
// cbPlikRemovable
//
resources.ApplyResources(this.cbPlikRemovable, "cbPlikRemovable");
this.cbPlikRemovable.Name = "cbPlikRemovable";
this.cbPlikRemovable.UseVisualStyleBackColor = true;
this.cbPlikRemovable.CheckedChanged += new System.EventHandler(this.cbPlikRemovable_CheckedChanged);
//
// gpPlikLoginCredentials
//
this.gpPlikLoginCredentials.Controls.Add(this.nudPlikTTL);
this.gpPlikLoginCredentials.Controls.Add(this.cbxPlikTTLUnit);
this.gpPlikLoginCredentials.Controls.Add(this.label1);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikURL);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikURL);
this.gpPlikLoginCredentials.Controls.Add(this.cbPlikIsSecured);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikAPIKey);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikAPIKey);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikPassword);
this.gpPlikLoginCredentials.Controls.Add(this.lblPlikUsername);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikPassword);
this.gpPlikLoginCredentials.Controls.Add(this.txtPlikLogin);
resources.ApplyResources(this.gpPlikLoginCredentials, "gpPlikLoginCredentials");
this.gpPlikLoginCredentials.Name = "gpPlikLoginCredentials";
this.gpPlikLoginCredentials.TabStop = false;
//
// nudPlikTTL
//
this.nudPlikTTL.DecimalPlaces = 2;
resources.ApplyResources(this.nudPlikTTL, "nudPlikTTL");
this.nudPlikTTL.Maximum = new decimal(new int[] {
1661992960,
1808227885,
5,
0});
this.nudPlikTTL.Name = "nudPlikTTL";
this.nudPlikTTL.Value = new decimal(new int[] {
1,
0,
0,
0});
this.nudPlikTTL.ValueChanged += new System.EventHandler(this.nudPlikTTL_ValueChanged);
//
// cbxPlikTTLUnit
//
this.cbxPlikTTLUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxPlikTTLUnit.FormattingEnabled = true;
this.cbxPlikTTLUnit.Items.AddRange(new object[] {
resources.GetString("cbxPlikTTLUnit.Items"),
resources.GetString("cbxPlikTTLUnit.Items1"),
resources.GetString("cbxPlikTTLUnit.Items2")});
resources.ApplyResources(this.cbxPlikTTLUnit, "cbxPlikTTLUnit");
this.cbxPlikTTLUnit.Name = "cbxPlikTTLUnit";
this.cbxPlikTTLUnit.SelectedIndexChanged += new System.EventHandler(this.cbxPlikTTLUnit_SelectedIndexChanged);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// txtPlikURL
//
resources.ApplyResources(this.txtPlikURL, "txtPlikURL");
this.txtPlikURL.Name = "txtPlikURL";
this.txtPlikURL.TextChanged += new System.EventHandler(this.txtPlikURL_TextChanged);
//
// lblPlikURL
//
resources.ApplyResources(this.lblPlikURL, "lblPlikURL");
this.lblPlikURL.Name = "lblPlikURL";
//
// cbPlikIsSecured
//
resources.ApplyResources(this.cbPlikIsSecured, "cbPlikIsSecured");
this.cbPlikIsSecured.Name = "cbPlikIsSecured";
this.cbPlikIsSecured.UseVisualStyleBackColor = true;
this.cbPlikIsSecured.CheckedChanged += new System.EventHandler(this.cbPlikIsSecured_CheckedChanged);
//
// lblPlikAPIKey
//
resources.ApplyResources(this.lblPlikAPIKey, "lblPlikAPIKey");
this.lblPlikAPIKey.Name = "lblPlikAPIKey";
//
// txtPlikAPIKey
//
resources.ApplyResources(this.txtPlikAPIKey, "txtPlikAPIKey");
this.txtPlikAPIKey.Name = "txtPlikAPIKey";
this.txtPlikAPIKey.TextChanged += new System.EventHandler(this.txtPlikAPIKey_TextChanged);
//
// lblPlikPassword
//
resources.ApplyResources(this.lblPlikPassword, "lblPlikPassword");
this.lblPlikPassword.Name = "lblPlikPassword";
//
// lblPlikUsername
//
resources.ApplyResources(this.lblPlikUsername, "lblPlikUsername");
this.lblPlikUsername.Name = "lblPlikUsername";
//
// txtPlikPassword
//
resources.ApplyResources(this.txtPlikPassword, "txtPlikPassword");
this.txtPlikPassword.Name = "txtPlikPassword";
this.txtPlikPassword.TextChanged += new System.EventHandler(this.txtPlikPassword_TextChanged);
//
// txtPlikLogin
//
resources.ApplyResources(this.txtPlikLogin, "txtPlikLogin");
this.txtPlikLogin.Name = "txtPlikLogin";
this.txtPlikLogin.TextChanged += new System.EventHandler(this.txtPlikLogin_TextChanged);
//
// btnCopyShowFiles
//
resources.ApplyResources(this.btnCopyShowFiles, "btnCopyShowFiles");
@ -4719,6 +4892,12 @@ private void InitializeComponent()
this.tpEmail.ResumeLayout(false);
this.tpEmail.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudEmailSmtpPort)).EndInit();
this.tpPlik.ResumeLayout(false);
this.gpPlikSettings.ResumeLayout(false);
this.gpPlikSettings.PerformLayout();
this.gpPlikLoginCredentials.ResumeLayout(false);
this.gpPlikLoginCredentials.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudPlikTTL)).EndInit();
this.tpTextUploaders.ResumeLayout(false);
this.tcTextUploaders.ResumeLayout(false);
this.tpPastebin.ResumeLayout(false);
@ -5308,5 +5487,24 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox txtAzureStorageContainer;
private System.Windows.Forms.Label lblAzureStorageContainer;
private System.Windows.Forms.Button btnAzureStoragePortal;
internal System.Windows.Forms.TabPage tpPlik;
private System.Windows.Forms.GroupBox gpPlikSettings;
private System.Windows.Forms.TextBox txtPlikComment;
private System.Windows.Forms.CheckBox cbPlikComment;
private System.Windows.Forms.CheckBox cbPlikRemovable;
private System.Windows.Forms.GroupBox gpPlikLoginCredentials;
private System.Windows.Forms.CheckBox cbPlikIsSecured;
private System.Windows.Forms.Label lblPlikAPIKey;
private System.Windows.Forms.TextBox txtPlikAPIKey;
private System.Windows.Forms.Label lblPlikPassword;
private System.Windows.Forms.Label lblPlikUsername;
private System.Windows.Forms.TextBox txtPlikPassword;
private System.Windows.Forms.TextBox txtPlikLogin;
private System.Windows.Forms.Label lblPlikURL;
private System.Windows.Forms.TextBox txtPlikURL;
private System.Windows.Forms.CheckBox cbPlikOneShot;
private System.Windows.Forms.ComboBox cbxPlikTTLUnit;
private System.Windows.Forms.NumericUpDown nudPlikTTL;
private System.Windows.Forms.Label label1;
}
}

View file

@ -595,6 +595,22 @@ public void LoadSettings()
txtAzureStorageAccessKey.Text = Config.AzureStorageAccountAccessKey;
txtAzureStorageContainer.Text = Config.AzureStorageContainer;
// Plik
txtPlikAPIKey.Text = Config.PlikAPIKey;
txtPlikURL.Text = Config.PlikURL;
txtPlikPassword.Text = Config.PlikPassword;
txtPlikLogin.Text = Config.PlikLogin;
txtPlikComment.Text = Config.PlikComment;
cbPlikComment.Checked = Config.PlikhasComment;
cbPlikIsSecured.Checked = Config.PlikIsSecured;
cbPlikRemovable.Checked = Config.PlikRemovable;
cbPlikOneShot.Checked = Config.PlikOneShot;
nudPlikTTL.Value = Config.PlikTTL;
cbxPlikTTLUnit.SelectedIndex = Config.PlikTTLUnit;
txtPlikComment.ReadOnly = !cbPlikComment.Checked;
txtPlikLogin.ReadOnly = !cbPlikIsSecured.Checked;
txtPlikPassword.ReadOnly = !cbPlikIsSecured.Checked;
#endregion File uploaders
#region URL shorteners
@ -2632,6 +2648,69 @@ private void btnAzureStoragePortal_Click(object sender, EventArgs e)
#endregion Azure Storage
#region Plik
private void txtPlikURL_TextChanged(object sender, EventArgs e)
{
Config.PlikURL = txtPlikURL.Text;
}
private void txtPlikAPIKey_TextChanged(object sender, EventArgs e)
{
Config.PlikAPIKey = txtPlikAPIKey.Text;
}
private void txtPlikLogin_TextChanged(object sender, EventArgs e)
{
Config.PlikLogin = txtPlikLogin.Text;
}
private void txtPlikPassword_TextChanged(object sender, EventArgs e)
{
Config.PlikPassword = txtPlikPassword.Text;
}
private void cbPlikIsSecured_CheckedChanged(object sender, EventArgs e)
{
Config.PlikIsSecured = cbPlikIsSecured.Checked;
txtPlikLogin.ReadOnly = !cbPlikIsSecured.Checked;
txtPlikPassword.ReadOnly = !cbPlikIsSecured.Checked;
}
private void cbPlikRemovable_CheckedChanged(object sender, EventArgs e)
{
Config.PlikRemovable = cbPlikRemovable.Checked;
}
private void cbPlikComment_CheckedChanged(object sender, EventArgs e)
{
Config.PlikhasComment = cbPlikComment.Checked;
txtPlikComment.ReadOnly = !cbPlikComment.Checked;
}
private void txtPlikComment_TextChanged(object sender, EventArgs e)
{
Config.PlikComment = txtPlikComment.Text;
}
private void cbPlikOneShot_CheckedChanged(object sender, EventArgs e)
{
Config.PlikOneShot = cbPlikOneShot.Checked;
}
private void cbxPlikTTLUnit_SelectedIndexChanged(object sender, EventArgs e)
{
nudPlikTTL.Value = nudPlikTTL.Value * Plik.GetMultiplyIndex(cbxPlikTTLUnit.SelectedIndex, Config.PlikTTLUnit); ;
Config.PlikTTLUnit = cbxPlikTTLUnit.SelectedIndex;
}
private void nudPlikTTL_ValueChanged(object sender, EventArgs e)
{
Config.PlikTTL = nudPlikTTL.Value;
}
#endregion Plik
#endregion File Uploaders
#region URL Shorteners

View file

@ -10588,6 +10588,513 @@ Using an encrypted library disables sharing.</value>
<data name="&gt;&gt;tpEmail.ZOrder" xml:space="preserve">
<value>25</value>
</data>
<data name="cbPlikOneShot.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbPlikOneShot.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbPlikOneShot.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 34</value>
</data>
<data name="cbPlikOneShot.Size" type="System.Drawing.Size, System.Drawing">
<value>176, 17</value>
</data>
<data name="cbPlikOneShot.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="cbPlikOneShot.Text" xml:space="preserve">
<value>Destruct after the first download</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.Name" xml:space="preserve">
<value>cbPlikOneShot</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.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;cbPlikOneShot.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikOneShot.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="txtPlikComment.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 74</value>
</data>
<data name="txtPlikComment.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtPlikComment.Size" type="System.Drawing.Size, System.Drawing">
<value>332, 164</value>
</data>
<data name="txtPlikComment.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;txtPlikComment.Name" xml:space="preserve">
<value>txtPlikComment</value>
</data>
<data name="&gt;&gt;txtPlikComment.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;txtPlikComment.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
</data>
<data name="&gt;&gt;txtPlikComment.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="cbPlikComment.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbPlikComment.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbPlikComment.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 54</value>
</data>
<data name="cbPlikComment.Size" type="System.Drawing.Size, System.Drawing">
<value>129, 17</value>
</data>
<data name="cbPlikComment.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="cbPlikComment.Text" xml:space="preserve">
<value>Comment (Markdown)</value>
</data>
<data name="&gt;&gt;cbPlikComment.Name" xml:space="preserve">
<value>cbPlikComment</value>
</data>
<data name="&gt;&gt;cbPlikComment.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;cbPlikComment.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikComment.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="cbPlikRemovable.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbPlikRemovable.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbPlikRemovable.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 15</value>
</data>
<data name="cbPlikRemovable.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="cbPlikRemovable.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="cbPlikRemovable.Text" xml:space="preserve">
<value>Removable</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.Name" xml:space="preserve">
<value>cbPlikRemovable</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.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;cbPlikRemovable.Parent" xml:space="preserve">
<value>gpPlikSettings</value>
</data>
<data name="&gt;&gt;cbPlikRemovable.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="gpPlikSettings.Location" type="System.Drawing.Point, System.Drawing">
<value>292, 19</value>
</data>
<data name="gpPlikSettings.Size" type="System.Drawing.Size, System.Drawing">
<value>344, 247</value>
</data>
<data name="gpPlikSettings.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="gpPlikSettings.Text" xml:space="preserve">
<value>Other settings</value>
</data>
<data name="&gt;&gt;gpPlikSettings.Name" xml:space="preserve">
<value>gpPlikSettings</value>
</data>
<data name="&gt;&gt;gpPlikSettings.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;gpPlikSettings.Parent" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;gpPlikSettings.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="nudPlikTTL.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 217</value>
</data>
<data name="nudPlikTTL.Size" type="System.Drawing.Size, System.Drawing">
<value>102, 20</value>
</data>
<data name="nudPlikTTL.TabIndex" type="System.Int32, mscorlib">
<value>28</value>
</data>
<data name="&gt;&gt;nudPlikTTL.Name" xml:space="preserve">
<value>nudPlikTTL</value>
</data>
<data name="&gt;&gt;nudPlikTTL.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;nudPlikTTL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;nudPlikTTL.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="cbxPlikTTLUnit.Items" xml:space="preserve">
<value>days</value>
</data>
<data name="cbxPlikTTLUnit.Items1" xml:space="preserve">
<value>hours</value>
</data>
<data name="cbxPlikTTLUnit.Items2" xml:space="preserve">
<value>minutes</value>
</data>
<data name="cbxPlikTTLUnit.Location" type="System.Drawing.Point, System.Drawing">
<value>117, 217</value>
</data>
<data name="cbxPlikTTLUnit.Size" type="System.Drawing.Size, System.Drawing">
<value>147, 21</value>
</data>
<data name="cbxPlikTTLUnit.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.Name" xml:space="preserve">
<value>cbxPlikTTLUnit</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;cbxPlikTTLUnit.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 202</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>182, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Files will be automatically removed in </value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.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;label1.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="txtPlikURL.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 31</value>
</data>
<data name="txtPlikURL.Size" type="System.Drawing.Size, System.Drawing">
<value>255, 20</value>
</data>
<data name="txtPlikURL.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="&gt;&gt;txtPlikURL.Name" xml:space="preserve">
<value>txtPlikURL</value>
</data>
<data name="&gt;&gt;txtPlikURL.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;txtPlikURL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikURL.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="lblPlikURL.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblPlikURL.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblPlikURL.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 15</value>
</data>
<data name="lblPlikURL.Size" type="System.Drawing.Size, System.Drawing">
<value>29, 13</value>
</data>
<data name="lblPlikURL.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="lblPlikURL.Text" xml:space="preserve">
<value>Host</value>
</data>
<data name="&gt;&gt;lblPlikURL.Name" xml:space="preserve">
<value>lblPlikURL</value>
</data>
<data name="&gt;&gt;lblPlikURL.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;lblPlikURL.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikURL.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="cbPlikIsSecured.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbPlikIsSecured.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbPlikIsSecured.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 100</value>
</data>
<data name="cbPlikIsSecured.Size" type="System.Drawing.Size, System.Drawing">
<value>190, 17</value>
</data>
<data name="cbPlikIsSecured.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="cbPlikIsSecured.Text" xml:space="preserve">
<value>Username and password required?</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.Name" xml:space="preserve">
<value>cbPlikIsSecured</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.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;cbPlikIsSecured.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;cbPlikIsSecured.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="lblPlikAPIKey.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblPlikAPIKey.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblPlikAPIKey.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 58</value>
</data>
<data name="lblPlikAPIKey.Size" type="System.Drawing.Size, System.Drawing">
<value>51, 13</value>
</data>
<data name="lblPlikAPIKey.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="lblPlikAPIKey.Text" xml:space="preserve">
<value>API Key: </value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.Name" xml:space="preserve">
<value>lblPlikAPIKey</value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.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;lblPlikAPIKey.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikAPIKey.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="txtPlikAPIKey.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 74</value>
</data>
<data name="txtPlikAPIKey.Size" type="System.Drawing.Size, System.Drawing">
<value>255, 20</value>
</data>
<data name="txtPlikAPIKey.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.Name" xml:space="preserve">
<value>txtPlikAPIKey</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.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;txtPlikAPIKey.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikAPIKey.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="lblPlikPassword.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblPlikPassword.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblPlikPassword.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 159</value>
</data>
<data name="lblPlikPassword.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 13</value>
</data>
<data name="lblPlikPassword.TabIndex" type="System.Int32, mscorlib">
<value>10</value>
</data>
<data name="lblPlikPassword.Text" xml:space="preserve">
<value>Password:</value>
</data>
<data name="&gt;&gt;lblPlikPassword.Name" xml:space="preserve">
<value>lblPlikPassword</value>
</data>
<data name="&gt;&gt;lblPlikPassword.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;lblPlikPassword.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikPassword.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="lblPlikUsername.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="lblPlikUsername.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="lblPlikUsername.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 120</value>
</data>
<data name="lblPlikUsername.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="lblPlikUsername.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="lblPlikUsername.Text" xml:space="preserve">
<value>Username:</value>
</data>
<data name="&gt;&gt;lblPlikUsername.Name" xml:space="preserve">
<value>lblPlikUsername</value>
</data>
<data name="&gt;&gt;lblPlikUsername.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;lblPlikUsername.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;lblPlikUsername.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="txtPlikPassword.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 175</value>
</data>
<data name="txtPlikPassword.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
<value>*</value>
</data>
<data name="txtPlikPassword.Size" type="System.Drawing.Size, System.Drawing">
<value>255, 20</value>
</data>
<data name="txtPlikPassword.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="&gt;&gt;txtPlikPassword.Name" xml:space="preserve">
<value>txtPlikPassword</value>
</data>
<data name="&gt;&gt;txtPlikPassword.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;txtPlikPassword.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikPassword.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="txtPlikLogin.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 136</value>
</data>
<data name="txtPlikLogin.Size" type="System.Drawing.Size, System.Drawing">
<value>255, 20</value>
</data>
<data name="txtPlikLogin.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;txtPlikLogin.Name" xml:space="preserve">
<value>txtPlikLogin</value>
</data>
<data name="&gt;&gt;txtPlikLogin.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;txtPlikLogin.Parent" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;txtPlikLogin.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="gpPlikLoginCredentials.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 19</value>
</data>
<data name="gpPlikLoginCredentials.Size" type="System.Drawing.Size, System.Drawing">
<value>271, 247</value>
</data>
<data name="gpPlikLoginCredentials.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="gpPlikLoginCredentials.Text" xml:space="preserve">
<value>Login Credentials</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.Name" xml:space="preserve">
<value>gpPlikLoginCredentials</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.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;gpPlikLoginCredentials.Parent" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;gpPlikLoginCredentials.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tpPlik.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 40</value>
</data>
<data name="tpPlik.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="tpPlik.Size" type="System.Drawing.Size, System.Drawing">
<value>972, 475</value>
</data>
<data name="tpPlik.TabIndex" type="System.Int32, mscorlib">
<value>29</value>
</data>
<data name="tpPlik.Text" xml:space="preserve">
<value>Plik</value>
</data>
<data name="&gt;&gt;tpPlik.Name" xml:space="preserve">
<value>tpPlik</value>
</data>
<data name="&gt;&gt;tpPlik.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;tpPlik.Parent" xml:space="preserve">
<value>tcFileUploaders</value>
</data>
<data name="&gt;&gt;tpPlik.ZOrder" xml:space="preserve">
<value>26</value>
</data>
<data name="tcFileUploaders.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>

View file

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

View file

@ -128,6 +128,7 @@
<Compile Include="FileUploaders\AzureStorageSettings.cs" />
<Compile Include="FileUploaders\Box.cs" />
<Compile Include="FileUploaders\Lithiio.cs" />
<Compile Include="FileUploaders\Plik.cs" />
<Compile Include="FileUploaders\Puush.cs" />
<Compile Include="FileUploaders\Sul.cs" />
<Compile Include="FileUploaders\Dropfile.cs" />

View file

@ -304,6 +304,20 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
public string AzureStorageAccountAccessKey = "";
public string AzureStorageContainer = "";
// Plik
public string PlikURL = "";
public string PlikAPIKey = "";
public bool PlikIsSecured = false;
public string PlikLogin = "";
public string PlikPassword = "";
public bool PlikRemovable = false;
public bool PlikOneShot = false;
public int PlikTTLUnit = 0;
public decimal PlikTTL = 30;
public string PlikComment = "";
public bool PlikhasComment = false;
#endregion File uploaders
#region URL shorteners