mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
#1298 redo the changes
This commit is contained in:
parent
ba60313cab
commit
bd89f3d18c
10 changed files with 1452 additions and 1189 deletions
BIN
ShareX.UploadersLib/Favicons/SomeImage.png
Normal file
BIN
ShareX.UploadersLib/Favicons/SomeImage.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
2042
ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs
generated
2042
ShareX.UploadersLib/Forms/UploadersConfigForm.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -112,6 +112,7 @@ private void FormSettings()
|
||||||
AddIconToTab(tpSeafile, Resources.Seafile);
|
AddIconToTab(tpSeafile, Resources.Seafile);
|
||||||
AddIconToTab(tpSendSpace, Resources.SendSpace);
|
AddIconToTab(tpSendSpace, Resources.SendSpace);
|
||||||
AddIconToTab(tpSharedFolder, Resources.server_network);
|
AddIconToTab(tpSharedFolder, Resources.server_network);
|
||||||
|
AddIconToTab(tpSomeImage, Resources.SomeImage);
|
||||||
AddIconToTab(tpStreamable, Resources.Streamable);
|
AddIconToTab(tpStreamable, Resources.Streamable);
|
||||||
AddIconToTab(tpSul, Resources.Sul);
|
AddIconToTab(tpSul, Resources.Sul);
|
||||||
AddIconToTab(tpTinyPic, Resources.TinyPic);
|
AddIconToTab(tpTinyPic, Resources.TinyPic);
|
||||||
|
@ -242,6 +243,11 @@ public void LoadSettings()
|
||||||
txtCheveretoAPIKey.Text = Config.CheveretoAPIKey;
|
txtCheveretoAPIKey.Text = Config.CheveretoAPIKey;
|
||||||
cbCheveretoDirectURL.Checked = Config.CheveretoDirectURL;
|
cbCheveretoDirectURL.Checked = Config.CheveretoDirectURL;
|
||||||
|
|
||||||
|
// SomeImage
|
||||||
|
|
||||||
|
txtSomeImageAPIKey.Text = Config.SomeImageAPIKey;
|
||||||
|
cbSomeImageDirectURL.Checked = Config.SomeImageDirectURL;
|
||||||
|
|
||||||
// vgy.me
|
// vgy.me
|
||||||
|
|
||||||
txtVgymeUserKey.Text = Config.VgymeUserKey;
|
txtVgymeUserKey.Text = Config.VgymeUserKey;
|
||||||
|
@ -998,6 +1004,25 @@ private void cbCheveretoDirectURL_CheckedChanged(object sender, EventArgs e)
|
||||||
|
|
||||||
#endregion Chevereto
|
#endregion Chevereto
|
||||||
|
|
||||||
|
#region SomeImage
|
||||||
|
|
||||||
|
private void txtSomeImageAPIKey_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Config.SomeImageAPIKey = txtSomeImageAPIKey.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cbSomeImageDirectURL_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Config.SomeImageDirectURL = cbSomeImageDirectURL.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void linkLblSomeImageAPIKey_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process.Start("https://someimage.com/api");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion SomeImage
|
||||||
|
|
||||||
#region vgy.me
|
#region vgy.me
|
||||||
|
|
||||||
private void txtVgymeUserKey_TextChanged(object sender, EventArgs e)
|
private void txtVgymeUserKey_TextChanged(object sender, EventArgs e)
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
|
@ -26,36 +26,36 @@
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
|
@ -12706,6 +12706,141 @@ Using an encrypted library disables sharing.</value>
|
||||||
<data name=">>tpChevereto.ZOrder" xml:space="preserve">
|
<data name=">>tpChevereto.ZOrder" xml:space="preserve">
|
||||||
<value>6</value>
|
<value>6</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="linkLblSomeImageAPIKey.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLblSomeImageAPIKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>376, 46</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLblSomeImageAPIKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>300, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLblSomeImageAPIKey.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="linkLblSomeImageAPIKey.Text" xml:space="preserve">
|
||||||
|
<value>To get API key visit https://someimage.com/api</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLblSomeImageAPIKey.Name" xml:space="preserve">
|
||||||
|
<value>linkLblSomeImageAPIKey</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLblSomeImageAPIKey.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLblSomeImageAPIKey.Parent" xml:space="preserve">
|
||||||
|
<value>tpSomeImage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>linkLblSomeImageAPIKey.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtSomeImageAPIKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>25, 43</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtSomeImageAPIKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>319, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtSomeImageAPIKey.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtSomeImageAPIKey.Name" xml:space="preserve">
|
||||||
|
<value>txtSomeImageAPIKey</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtSomeImageAPIKey.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=">>txtSomeImageAPIKey.Parent" xml:space="preserve">
|
||||||
|
<value>tpSomeImage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtSomeImageAPIKey.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSomeImageAPIKey.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSomeImageAPIKey.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>22, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSomeImageAPIKey.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>59, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSomeImageAPIKey.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblSomeImageAPIKey.Text" xml:space="preserve">
|
||||||
|
<value>API key:</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblSomeImageAPIKey.Name" xml:space="preserve">
|
||||||
|
<value>lblSomeImageAPIKey</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblSomeImageAPIKey.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=">>lblSomeImageAPIKey.Parent" xml:space="preserve">
|
||||||
|
<value>tpSomeImage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>lblSomeImageAPIKey.ZOrder" xml:space="preserve">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbSomeImageDirectURL.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbSomeImageDirectURL.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>25, 88</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbSomeImageDirectURL.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>4, 4, 4, 4</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbSomeImageDirectURL.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>99, 21</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbSomeImageDirectURL.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="cbSomeImageDirectURL.Text" xml:space="preserve">
|
||||||
|
<value>Direct URL</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbSomeImageDirectURL.Name" xml:space="preserve">
|
||||||
|
<value>cbSomeImageDirectURL</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbSomeImageDirectURL.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=">>cbSomeImageDirectURL.Parent" xml:space="preserve">
|
||||||
|
<value>tpSomeImage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>cbSomeImageDirectURL.ZOrder" xml:space="preserve">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpSomeImage.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>4, 25</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpSomeImage.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>4, 4, 4, 4</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpSomeImage.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||||
|
<value>4, 4, 4, 4</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpSomeImage.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>1301, 612</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpSomeImage.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>10</value>
|
||||||
|
</data>
|
||||||
|
<data name="tpSomeImage.Text" xml:space="preserve">
|
||||||
|
<value>SomeImage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpSomeImage.Name" xml:space="preserve">
|
||||||
|
<value>tpSomeImage</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpSomeImage.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=">>tpSomeImage.Parent" xml:space="preserve">
|
||||||
|
<value>tcImageUploaders</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tpSomeImage.ZOrder" xml:space="preserve">
|
||||||
|
<value>7</value>
|
||||||
|
</data>
|
||||||
<data name="llVgymeAccountDetailsPage.AutoSize" type="System.Boolean, mscorlib">
|
<data name="llVgymeAccountDetailsPage.AutoSize" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -13102,4 +13237,4 @@ Using an encrypted library disables sharing.</value>
|
||||||
<data name=">>$this.Type" xml:space="preserve">
|
<data name=">>$this.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -28,6 +28,7 @@ You should have received a copy of the GNU General Public License
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace ShareX.UploadersLib.ImageUploaders
|
namespace ShareX.UploadersLib.ImageUploaders
|
||||||
{
|
{
|
||||||
|
@ -35,6 +36,8 @@ public sealed class SomeImage : ImageUploader
|
||||||
{
|
{
|
||||||
private const string API_ENDPOINT = "https://someimage.com/api/2/image/upload";
|
private const string API_ENDPOINT = "https://someimage.com/api/2/image/upload";
|
||||||
|
|
||||||
|
public bool DirectURL { get; set; }
|
||||||
|
|
||||||
private string API_KEY = "";
|
private string API_KEY = "";
|
||||||
|
|
||||||
public SomeImage(string apiKey)
|
public SomeImage(string apiKey)
|
||||||
|
@ -58,8 +61,31 @@ public override UploadResult Upload(Stream stream, string fileName)
|
||||||
|
|
||||||
if (jsonResponse != null)
|
if (jsonResponse != null)
|
||||||
{
|
{
|
||||||
result.URL = jsonResponse.imagelink;
|
if (DirectURL)
|
||||||
|
{
|
||||||
|
if (jsonResponse.imagelink == null)
|
||||||
|
{
|
||||||
|
result.URL = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Uri responseUri = new Uri(jsonResponse.imagelink); // http://someimage.com/asdf
|
||||||
|
string host = responseUri.Host; // someimage.com
|
||||||
|
string filename = Path.GetFileName(responseUri.AbsolutePath); // /asdf
|
||||||
|
if (filename.StartsWith("/"))
|
||||||
|
{
|
||||||
|
filename = filename.Remove(0, 1); // asdf
|
||||||
|
}
|
||||||
|
if (host.StartsWith("www."))
|
||||||
|
{
|
||||||
|
host = host.Remove(0, 4);
|
||||||
|
}
|
||||||
|
result.URL = "https://i1." + host + "/" + filename + ".jpg";
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
result.URL = jsonResponse.imagelink;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,4 +102,4 @@ public class SomeImageResponse
|
||||||
public string embedhtml { get; set; }
|
public string embedhtml { get; set; }
|
||||||
public string embedbb { get; set; }
|
public string embedbb { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
274
ShareX.UploadersLib/Properties/Resources.Designer.cs
generated
274
ShareX.UploadersLib/Properties/Resources.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
|
@ -26,36 +26,36 @@
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
|
@ -440,6 +440,9 @@ Created folders:</value>
|
||||||
<data name="Chevereto" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Chevereto" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Favicons\Chevereto.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Favicons\Chevereto.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SomeImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Favicons\SomeImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="AmazonS3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="AmazonS3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Favicons\AmazonS3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Favicons\AmazonS3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -494,4 +497,4 @@ Created folders:</value>
|
||||||
<data name="Vgyme" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Vgyme" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\favicons\vgyme.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\favicons\vgyme.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -884,6 +884,7 @@
|
||||||
<None Include="Resources\question-button.png" />
|
<None Include="Resources\question-button.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="Favicons\SomeImage.png" />
|
||||||
<Content Include="Favicons\Streamable.ico" />
|
<Content Include="Favicons\Streamable.ico" />
|
||||||
<Content Include="Favicons\Sul.png" />
|
<Content Include="Favicons\Sul.png" />
|
||||||
<Content Include="Favicons\Vgyme.ico" />
|
<Content Include="Favicons\Vgyme.ico" />
|
||||||
|
@ -907,4 +908,4 @@ if not exist APIKeysLocal.cs (
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -82,6 +82,11 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
||||||
public string CheveretoAPIKey = string.Empty;
|
public string CheveretoAPIKey = string.Empty;
|
||||||
public bool CheveretoDirectURL = true;
|
public bool CheveretoDirectURL = true;
|
||||||
|
|
||||||
|
// SomeImage
|
||||||
|
|
||||||
|
public string SomeImageAPIKey = string.Empty;
|
||||||
|
public bool SomeImageDirectURL = true;
|
||||||
|
|
||||||
// vgy.me
|
// vgy.me
|
||||||
|
|
||||||
public string VgymeUserKey = string.Empty;
|
public string VgymeUserKey = string.Empty;
|
||||||
|
@ -392,6 +397,8 @@ public bool IsValid(ImageDestination destination)
|
||||||
return TwitterOAuthInfoList != null && TwitterOAuthInfoList.IsValidIndex(TwitterSelectedAccount) && OAuthInfo.CheckOAuth(TwitterOAuthInfoList[TwitterSelectedAccount]);
|
return TwitterOAuthInfoList != null && TwitterOAuthInfoList.IsValidIndex(TwitterSelectedAccount) && OAuthInfo.CheckOAuth(TwitterOAuthInfoList[TwitterSelectedAccount]);
|
||||||
case ImageDestination.Chevereto:
|
case ImageDestination.Chevereto:
|
||||||
return !string.IsNullOrEmpty(CheveretoWebsite) && !string.IsNullOrEmpty(CheveretoAPIKey);
|
return !string.IsNullOrEmpty(CheveretoWebsite) && !string.IsNullOrEmpty(CheveretoAPIKey);
|
||||||
|
case ImageDestination.SomeImage:
|
||||||
|
return !string.IsNullOrEmpty(SomeImageAPIKey);
|
||||||
case ImageDestination.CustomImageUploader:
|
case ImageDestination.CustomImageUploader:
|
||||||
return CustomUploadersList != null && CustomUploadersList.IsValidIndex(CustomImageUploaderSelected);
|
return CustomUploadersList != null && CustomUploadersList.IsValidIndex(CustomImageUploaderSelected);
|
||||||
}
|
}
|
||||||
|
|
|
@ -827,7 +827,15 @@ public UploadResult UploadImage(Stream stream, string fileName)
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case ImageDestination.SomeImage:
|
case ImageDestination.SomeImage:
|
||||||
imageUploader = new SomeImage(APIKeys.SomeImageKey);
|
String someImageAPIKey = Program.UploadersConfig.SomeImageAPIKey;
|
||||||
|
if (someImageAPIKey == "")
|
||||||
|
{
|
||||||
|
someImageAPIKey = APIKeys.SomeImageKey;
|
||||||
|
}
|
||||||
|
imageUploader = new SomeImage(someImageAPIKey)
|
||||||
|
{
|
||||||
|
DirectURL = Program.UploadersConfig.SomeImageDirectURL
|
||||||
|
};
|
||||||
break;
|
break;
|
||||||
case ImageDestination.CustomImageUploader:
|
case ImageDestination.CustomImageUploader:
|
||||||
CustomUploaderItem customUploader = GetCustomUploader(Program.UploadersConfig.CustomImageUploaderSelected);
|
CustomUploaderItem customUploader = GetCustomUploader(Program.UploadersConfig.CustomImageUploaderSelected);
|
||||||
|
|
Loading…
Reference in a new issue