diff --git a/ShareX.UploadersLib/Enums.cs b/ShareX.UploadersLib/Enums.cs index c114aab6a..ab3c6e9fd 100644 --- a/ShareX.UploadersLib/Enums.cs +++ b/ShareX.UploadersLib/Enums.cs @@ -125,6 +125,8 @@ public enum FileDestination VideoBin, [Description("Pomf")] Pomf, + [Description("Uguu")] + Uguu, [Description("Dropfile")] Dropfile, [Description("Up1")] diff --git a/ShareX.UploadersLib/FileUploaders/Pomf.cs b/ShareX.UploadersLib/FileUploaders/Pomf.cs index 8454da2a3..474e00d33 100644 --- a/ShareX.UploadersLib/FileUploaders/Pomf.cs +++ b/ShareX.UploadersLib/FileUploaders/Pomf.cs @@ -38,26 +38,26 @@ public class Pomf : FileUploader public static List Uploaders = new List() { 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; } } } -} +} \ No newline at end of file diff --git a/ShareX.UploadersLib/FileUploaders/Uguu.cs b/ShareX.UploadersLib/FileUploaders/Uguu.cs new file mode 100644 index 000000000..c90244ae4 --- /dev/null +++ b/ShareX.UploadersLib/FileUploaders/Uguu.cs @@ -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 . +*/ + +#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 arguments = new Dictionary(); + + 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; + } + } +} \ No newline at end of file diff --git a/ShareX.UploadersLib/ShareX.UploadersLib.csproj b/ShareX.UploadersLib/ShareX.UploadersLib.csproj index 53caf3ae4..0bb9420fb 100644 --- a/ShareX.UploadersLib/ShareX.UploadersLib.csproj +++ b/ShareX.UploadersLib/ShareX.UploadersLib.csproj @@ -142,6 +142,7 @@ + Form diff --git a/ShareX/WorkerTask.cs b/ShareX/WorkerTask.cs index ffae9a0fe..9ae8da915 100644 --- a/ShareX/WorkerTask.cs +++ b/ShareX/WorkerTask.cs @@ -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;