mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 21:20:28 +12:00
Made pomf.cat as default pomf uploader
This commit is contained in:
parent
360a945894
commit
69ca70130c
|
@ -25,8 +25,10 @@
|
|||
|
||||
using Newtonsoft.Json;
|
||||
using ShareX.HelpersLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace ShareX.UploadersLib.FileUploaders
|
||||
{
|
||||
|
@ -52,7 +54,15 @@ public class Pomf : FileUploader
|
|||
new PomfUploader("up.che.moe", "http://up.che.moe/upload.php", "http://cdn.che.moe")
|
||||
};
|
||||
|
||||
public PomfUploader Uploader { get; set; }
|
||||
public static PomfUploader DefaultUploader
|
||||
{
|
||||
get
|
||||
{
|
||||
return Uploaders.FirstOrDefault(x => x.Name.Equals("pomf.cat", StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
}
|
||||
|
||||
public PomfUploader Uploader { get; private set; }
|
||||
|
||||
public Pomf(PomfUploader uploader)
|
||||
{
|
||||
|
|
|
@ -252,7 +252,7 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
|||
|
||||
// Pomf
|
||||
|
||||
public PomfUploader PomfUploader = new PomfUploader();
|
||||
public PomfUploader PomfUploader = Pomf.DefaultUploader;
|
||||
|
||||
#endregion File uploaders
|
||||
|
||||
|
@ -421,6 +421,8 @@ public bool IsValid(FileDestination destination)
|
|||
return OAuthInfo.CheckOAuth(JiraOAuthInfo);
|
||||
case FileDestination.Lambda:
|
||||
return LambdaSettings != null && !string.IsNullOrEmpty(LambdaSettings.UserAPIKey);
|
||||
case FileDestination.Pomf:
|
||||
return PomfUploader != null && !string.IsNullOrEmpty(PomfUploader.UploadURL);
|
||||
case FileDestination.SharedFolder:
|
||||
return LocalhostAccountList != null && LocalhostAccountList.IsValidIndex(LocalhostSelectedFiles);
|
||||
case FileDestination.Email:
|
||||
|
|
Loading…
Reference in a new issue