mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Added uguu.se file uploader
This commit is contained in:
parent
6c6bdc4a47
commit
f7e80cb176
5 changed files with 75 additions and 10 deletions
|
@ -125,6 +125,8 @@ public enum FileDestination
|
|||
VideoBin,
|
||||
[Description("Pomf")]
|
||||
Pomf,
|
||||
[Description("Uguu")]
|
||||
Uguu,
|
||||
[Description("Dropfile")]
|
||||
Dropfile,
|
||||
[Description("Up1")]
|
||||
|
|
|
@ -51,7 +51,7 @@ public class Pomf : FileUploader
|
|||
new PomfUploader("http://nigger.cat/upload.php"),
|
||||
//new PomfUploader("http://nyanimg.com/upload.php"),
|
||||
new PomfUploader("http://openhost.xyz/upload.php"),
|
||||
// new PomfUploader("https://pantsu.cat/upload.php"),
|
||||
new PomfUploader("https://pantsu.cat/upload.php"),
|
||||
new PomfUploader("https://pomf.cat/upload.php", "http://a.pomf.cat"),
|
||||
new PomfUploader("http://pomf.hummingbird.moe/upload.php", "http://a.pomf.hummingbird.moe"),
|
||||
new PomfUploader("https://pomf.io/upload.php"),
|
||||
|
|
59
ShareX.UploadersLib/FileUploaders/Uguu.cs
Normal file
59
ShareX.UploadersLib/FileUploaders/Uguu.cs
Normal file
|
@ -0,0 +1,59 @@
|
|||
#region License Information (GPL v3)
|
||||
|
||||
/*
|
||||
ShareX - A program that allows you to take screenshots and share any file type
|
||||
Copyright (c) 2007-2015 ShareX Team
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#endregion License Information (GPL v3)
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace ShareX.UploadersLib.FileUploaders
|
||||
{
|
||||
public class Uguu : FileUploader
|
||||
{
|
||||
public bool RandomName { get; set; }
|
||||
public string CustomName { get; set; }
|
||||
|
||||
public override UploadResult Upload(Stream stream, string fileName)
|
||||
{
|
||||
Dictionary<string, string> arguments = new Dictionary<string, string>();
|
||||
|
||||
if (RandomName)
|
||||
{
|
||||
arguments.Add("randomname", "on");
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(CustomName))
|
||||
{
|
||||
arguments.Add("name", CustomName);
|
||||
}
|
||||
|
||||
UploadResult result = UploadData(stream, "https://uguu.se/api.php?d=upload-tool", fileName, "file", arguments);
|
||||
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
result.URL = result.Response;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -142,6 +142,7 @@
|
|||
<Compile Include="FileUploaders\SFTP.cs" />
|
||||
<Compile Include="FileUploaders\Minus.cs" />
|
||||
<Compile Include="FileUploaders\SharedFolderUploader.cs" />
|
||||
<Compile Include="FileUploaders\Uguu.cs" />
|
||||
<Compile Include="FileUploaders\VideoBin.cs" />
|
||||
<Compile Include="FTPClient\FTPClientForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
|
|
@ -1100,6 +1100,9 @@ public UploadResult UploadFile(Stream stream, string fileName)
|
|||
case FileDestination.Pomf:
|
||||
fileUploader = new Pomf(Program.UploadersConfig.PomfUploader);
|
||||
break;
|
||||
case FileDestination.Uguu:
|
||||
fileUploader = new Uguu();
|
||||
break;
|
||||
case FileDestination.Dropfile:
|
||||
fileUploader = new Dropfile();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue