Added uguu.se file uploader

This commit is contained in:
Jaex 2015-11-18 15:07:56 +02:00
parent 6c6bdc4a47
commit f7e80cb176
5 changed files with 75 additions and 10 deletions

View file

@ -125,6 +125,8 @@ public enum FileDestination
VideoBin,
[Description("Pomf")]
Pomf,
[Description("Uguu")]
Uguu,
[Description("Dropfile")]
Dropfile,
[Description("Up1")]

View file

@ -38,26 +38,26 @@ public class Pomf : FileUploader
public static List<PomfUploader> Uploaders = new List<PomfUploader>()
{
new PomfUploader("http://1339.cf/upload.php", "http://b.1339.cf"),
// new PomfUploader("https://bucket.pw/upload.php", "https://dl.bucket.pw"),
//new PomfUploader("https://bucket.pw/upload.php", "https://dl.bucket.pw"),
new PomfUploader("http://catgirlsare.sexy/upload.php"),
new PomfUploader("http://cuntflaps.me/upload.php", "http://a.cuntflaps.me"),
// new PomfUploader("https://fuwa.se/api/upload"),
//new PomfUploader("https://fuwa.se/api/upload"),
new PomfUploader("http://g.zxq.co/upload.php", "http://y.zxq.co"),
new PomfUploader("http://kyaa.sg/upload.php", "https://r.kyaa.sg"),
// new PomfUploader("https://madokami.com/upload"),
// new PomfUploader("http://matu.red/upload.php", "http://x.matu.red"),
//new PomfUploader("https://madokami.com/upload"),
//new PomfUploader("http://matu.red/upload.php", "http://x.matu.red"),
new PomfUploader("https://maxfile.ro/static/upload.php", "https://d.maxfile.ro"),
new PomfUploader("https://mixtape.moe/upload.php"),
new PomfUploader("http://nigger.cat/upload.php"),
// new PomfUploader("http://nyanimg.com/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"),
new PomfUploader("http://pomf.pl/upload.php"),
// new PomfUploader("https://pomf.se/upload.php", "https://a.pomf.se"),
// new PomfUploader("https://sheesh.in/upload.php"),
//new PomfUploader("https://pomf.se/upload.php", "https://a.pomf.se"),
//new PomfUploader("https://sheesh.in/upload.php"),
new PomfUploader("http://up.che.moe/upload.php", "http://cdn.che.moe")
};
@ -150,4 +150,4 @@ private class PomfFile
public string size { get; set; }
}
}
}
}

View 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;
}
}
}

View file

@ -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>

View file

@ -585,7 +585,7 @@ private bool DoAfterCaptureJobs()
if (imageSaved)
{
DebugHelper.WriteLine("Image saved to file with dialog: " + Info.FilePath);
}
}
}
else
{
@ -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;