ShareX/ShareX.UploadersLib/UploadersConfig.cs

510 lines
15 KiB
C#
Raw Normal View History

2013-11-03 23:53:49 +13:00
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
2020-02-05 20:19:48 +13:00
Copyright (c) 2007-2020 ShareX Team
2013-11-03 23:53:49 +13:00
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 CG.Web.MegaApiClient;
2014-12-11 09:25:20 +13:00
using ShareX.HelpersLib;
using ShareX.UploadersLib.FileUploaders;
using ShareX.UploadersLib.ImageUploaders;
using ShareX.UploadersLib.TextUploaders;
2018-10-02 12:11:53 +13:00
using ShareX.UploadersLib.URLShorteners;
2016-02-15 19:53:30 +13:00
using System.Collections.Generic;
2013-11-03 23:53:49 +13:00
2014-12-11 09:25:20 +13:00
namespace ShareX.UploadersLib
2013-11-03 23:53:49 +13:00
{
public class UploadersConfig : SettingsBase<UploadersConfig>
{
#region Image uploaders
#region Imgur
2020-06-01 11:53:41 +12:00
public AccountType ImgurAccountType { get; set; } = AccountType.Anonymous;
public bool ImgurDirectLink { get; set; } = true;
public ImgurThumbnailType ImgurThumbnailType { get; set; } = ImgurThumbnailType.Medium_Thumbnail;
public bool ImgurUseGIFV { get; set; } = true;
public OAuth2Info ImgurOAuth2Info { get; set; } = null;
public bool ImgurUploadSelectedAlbum { get; set; } = false;
public ImgurAlbumData ImgurSelectedAlbum { get; set; } = null;
public List<ImgurAlbumData> ImgurAlbumList { get; set; } = null;
2018-03-01 11:52:11 +13:00
#endregion Imgur
#region ImageShack
2014-02-01 11:11:25 +13:00
2020-06-01 11:53:41 +12:00
public ImageShackOptions ImageShackSettings { get; set; } = new ImageShackOptions();
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion ImageShack
#region Flickr
2013-11-03 23:53:49 +13:00
2020-06-01 11:53:41 +12:00
public OAuthInfo FlickrOAuthInfo { get; set; } = null;
public FlickrSettings FlickrSettings { get; set; } = new FlickrSettings();
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Flickr
#region Photobucket
2013-11-03 23:53:49 +13:00
2020-06-01 11:53:41 +12:00
public OAuthInfo PhotobucketOAuthInfo { get; set; } = null;
public PhotobucketAccountInfo PhotobucketAccountInfo { get; set; } = null;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Photobucket
#region Google Photos
2013-11-03 23:53:49 +13:00
2020-06-01 11:53:41 +12:00
public OAuth2Info GooglePhotosOAuth2Info { get; set; } = null;
public OAuthUserInfo GooglePhotosUserInfo { get; set; } = null;
public string GooglePhotosAlbumID { get; set; } = "";
public bool GooglePhotosIsPublic { get; set; } = false;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Google Photos
#region Chevereto
2014-09-18 07:25:23 +12:00
2020-06-01 11:53:41 +12:00
public CheveretoUploader CheveretoUploader { get; set; } = new CheveretoUploader();
public bool CheveretoDirectURL { get; set; } = true;
2014-09-18 07:25:23 +12:00
2018-03-01 11:52:11 +13:00
#endregion Chevereto
#region vgy.me
2016-02-14 13:28:41 +13:00
2020-06-01 11:53:41 +12:00
[JsonEncrypt]
public string VgymeUserKey { get; set; } = "";
2016-02-14 13:28:41 +13:00
2018-03-01 11:52:11 +13:00
#endregion vgy.me
2013-11-03 23:53:49 +13:00
#endregion Image uploaders
#region Text uploaders
#region Pastebin
2013-11-03 23:53:49 +13:00
2020-06-01 12:16:18 +12:00
public PastebinSettings PastebinSettings { get; set; } = new PastebinSettings();
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Pastebin
#region Paste.ee
2013-11-03 23:53:49 +13:00
2020-06-01 12:16:18 +12:00
[JsonEncrypt]
public string Paste_eeUserKey { get; set; } = "";
public bool Paste_eeEncryptPaste { get; set; } = false;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Paste.ee
#region Gist
2020-06-01 12:16:18 +12:00
public OAuth2Info GistOAuth2Info { get; set; } = null;
public bool GistPublishPublic { get; set; } = false;
public bool GistRawURL { get; set; } = false;
public string GistCustomURL { get; set; } = "";
2018-03-01 11:52:11 +13:00
#endregion Gist
#region uPaste
2014-02-01 10:17:39 +13:00
2020-06-01 12:16:18 +12:00
[JsonEncrypt]
public string UpasteUserKey { get; set; } = "";
public bool UpasteIsPublic { get; set; } = false;
2014-02-01 10:17:39 +13:00
2018-03-01 11:52:11 +13:00
#endregion uPaste
#region Hastebin
2014-09-26 17:18:44 +12:00
2020-06-01 12:16:18 +12:00
public string HastebinCustomDomain { get; set; } = "https://hastebin.com";
public string HastebinSyntaxHighlighting { get; set; } = "hs";
public bool HastebinUseFileExtension { get; set; } = true;
2014-09-26 17:18:44 +12:00
2018-03-01 11:52:11 +13:00
#endregion Hastebin
#region OneTimeSecret
2015-08-04 00:59:33 +12:00
2020-06-01 12:16:18 +12:00
public string OneTimeSecretAPIUsername { get; set; } = "";
[JsonEncrypt]
public string OneTimeSecretAPIKey { get; set; } = "";
2015-08-04 00:59:33 +12:00
2018-03-01 11:52:11 +13:00
#endregion OneTimeSecret
#region Pastie
2020-06-01 12:16:18 +12:00
public bool PastieIsPublic { get; set; } = false;
2018-03-01 11:52:11 +13:00
#endregion Pastie
2013-11-03 23:53:49 +13:00
#endregion Text uploaders
#region File uploaders
#region Dropbox
2013-11-03 23:53:49 +13:00
public OAuth2Info DropboxOAuth2Info = null;
public string DropboxUploadPath = "ShareX/%y/%mo";
public bool DropboxAutoCreateShareableLink = true;
public bool DropboxUseDirectLink = false;
// TEMP: For backward compatibility
public DropboxURLType DropboxURLType = DropboxURLType.Default;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Dropbox
#region FTP
2016-06-12 06:54:14 +12:00
public List<FTPAccount> FTPAccountList = new List<FTPAccount>();
public int FTPSelectedImage = 0;
public int FTPSelectedText = 0;
public int FTPSelectedFile = 0;
2018-03-01 11:52:11 +13:00
#endregion FTP
#region OneDrive
2014-07-16 00:17:02 +12:00
2018-04-14 03:10:58 +12:00
public OAuth2Info OneDriveV2OAuth2Info = null;
public OneDriveFileInfo OneDriveV2SelectedFolder = OneDrive.RootFolder;
public bool OneDriveAutoCreateShareableLink = true;
2014-07-16 00:17:02 +12:00
2018-03-01 11:52:11 +13:00
#endregion OneDrive
#region Gfycat
2017-03-28 12:05:28 +13:00
public OAuth2Info GfycatOAuth2Info = null;
public AccountType GfycatAccountType = AccountType.Anonymous;
public bool GfycatIsPublic = false;
2019-03-12 20:49:23 +13:00
public bool GfycatKeepAudio = true;
2017-03-28 12:05:28 +13:00
2018-03-01 11:52:11 +13:00
#endregion Gfycat
#region Google Drive
2013-11-03 23:53:49 +13:00
public OAuth2Info GoogleDriveOAuth2Info = null;
public bool GoogleDriveIsPublic = true;
public bool GoogleDriveDirectLink = false;
public bool GoogleDriveUseFolder = false;
2016-05-25 06:15:45 +12:00
public string GoogleDriveFolderID = "";
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Google Drive
#region puush
2016-06-12 06:54:14 +12:00
public string PuushAPIKey = "";
2018-03-01 11:52:11 +13:00
#endregion puush
#region SendSpace
2013-11-03 23:53:49 +13:00
public AccountType SendSpaceAccountType = AccountType.Anonymous;
2016-05-25 06:15:45 +12:00
public string SendSpaceUsername = "";
public string SendSpacePassword = "";
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion SendSpace
#region Box
2013-11-03 23:53:49 +13:00
2014-04-17 04:18:25 +12:00
public OAuth2Info BoxOAuth2Info = null;
2014-04-17 11:34:31 +12:00
public BoxFileEntry BoxSelectedFolder = Box.RootFolder;
2013-11-03 23:53:49 +13:00
public bool BoxShare = true;
public BoxShareAccessLevel BoxShareAccessLevel = BoxShareAccessLevel.Open;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Box
#region Ge.tt
2013-11-03 23:53:49 +13:00
public Ge_ttLogin Ge_ttLogin = null;
2018-03-01 11:52:11 +13:00
#endregion Ge.tt
#region Localhostr
2013-11-03 23:53:49 +13:00
2016-05-25 06:15:45 +12:00
public string LocalhostrEmail = "";
public string LocalhostrPassword = "";
2013-11-03 23:53:49 +13:00
public bool LocalhostrDirectURL = true;
2018-03-01 11:52:11 +13:00
#endregion Localhostr
#region Shared folder
2013-11-03 23:53:49 +13:00
public List<LocalhostAccount> LocalhostAccountList = new List<LocalhostAccount>();
public int LocalhostSelectedImages = 0;
public int LocalhostSelectedText = 0;
public int LocalhostSelectedFiles = 0;
2018-03-01 11:52:11 +13:00
#endregion Shared folder
#region Email
2013-11-03 23:53:49 +13:00
public string EmailSmtpServer = "smtp.gmail.com";
public int EmailSmtpPort = 587;
public string EmailFrom = "...@gmail.com";
2016-05-25 06:15:45 +12:00
public string EmailPassword = "";
2013-11-03 23:53:49 +13:00
public bool EmailRememberLastTo = true;
2016-05-25 06:15:45 +12:00
public string EmailLastTo = "";
public string EmailDefaultSubject = "Sending email from ShareX";
2013-11-03 23:53:49 +13:00
public string EmailDefaultBody = "Screenshot is attached.";
public bool EmailAutomaticSend = false;
public string EmailAutomaticSendTo = "";
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Email
#region Jira
2013-11-03 23:53:49 +13:00
public string JiraHost = "http://";
public string JiraIssuePrefix = "PROJECT-";
public OAuthInfo JiraOAuthInfo = null;
2018-03-01 11:52:11 +13:00
#endregion Jira
#region Mega
2013-11-03 23:53:49 +13:00
public MegaApiClient.AuthInfos MegaAuthInfos = null;
public string MegaParentNodeId = null;
2018-03-01 11:52:11 +13:00
#endregion Mega
#region Amazon S3
2014-03-27 05:56:05 +13:00
2014-03-29 01:55:41 +13:00
public AmazonS3Settings AmazonS3Settings = new AmazonS3Settings()
{
ObjectPrefix = "ShareX/%y/%mo"
2014-03-27 05:56:05 +13:00
};
2018-03-01 11:52:11 +13:00
#endregion Amazon S3
#region ownCloud / Nextcloud
2014-07-07 06:45:36 +12:00
public string OwnCloudHost = "";
public string OwnCloudUsername = "";
public string OwnCloudPassword = "";
public string OwnCloudPath = "/";
public int OwnCloudExpiryTime = 7;
public bool OwnCloudCreateShare = true;
2014-07-07 09:06:37 +12:00
public bool OwnCloudDirectLink = false;
public bool OwnCloud81Compatibility = true;
public bool OwnCloudUsePreviewLinks = false;
2018-09-11 04:55:07 +12:00
public bool OwnCloudAutoExpire = false;
2014-07-07 06:45:36 +12:00
2018-03-01 11:52:11 +13:00
#endregion ownCloud / Nextcloud
#region MediaFire
2014-07-23 10:32:14 +12:00
public string MediaFireUsername = "";
public string MediaFirePassword = "";
public string MediaFirePath = "";
2014-07-23 13:59:45 +12:00
public bool MediaFireUseLongLink = false;
2014-07-23 10:32:14 +12:00
2018-03-01 11:52:11 +13:00
#endregion MediaFire
#region Pushbullet
public PushbulletSettings PushbulletSettings = new PushbulletSettings();
2018-03-01 11:52:11 +13:00
#endregion Pushbullet
#region Lambda
2015-02-04 09:12:53 +13:00
public LambdaSettings LambdaSettings = new LambdaSettings();
2018-03-01 11:52:11 +13:00
#endregion Lambda
#region Lithiio
public LithiioSettings LithiioSettings = new LithiioSettings();
2018-03-01 11:52:11 +13:00
#endregion Lithiio
2019-01-18 20:57:11 +13:00
#region Teknik
public OAuth2Info TeknikOAuth2Info = null;
public string TeknikUploadAPIUrl = Teknik.DefaultUploadAPIURL;
public string TeknikPasteAPIUrl = Teknik.DefaultPasteAPIURL;
public string TeknikUrlShortenerAPIUrl = Teknik.DefaultUrlShortenerAPIURL;
public string TeknikAuthUrl = Teknik.DefaultAuthURL;
2019-01-18 20:57:11 +13:00
public TeknikExpirationUnit TeknikExpirationUnit = TeknikExpirationUnit.Never;
public int TeknikExpirationLength = 1;
2019-01-18 20:57:11 +13:00
public bool TeknikEncryption = false;
public bool TeknikGenerateDeletionKey = false;
#endregion Teknik
2019-01-18 20:57:11 +13:00
#region Pomf
public PomfUploader PomfUploader = new PomfUploader();
2018-03-01 11:52:11 +13:00
#endregion Pomf
#region s-ul
2015-12-12 15:30:12 +13:00
2016-05-25 06:15:45 +12:00
public string SulAPIKey = "";
2015-12-12 15:30:12 +13:00
2018-03-01 11:52:11 +13:00
#endregion s-ul
#region Seafile
public string SeafileAPIURL = "";
public string SeafileAuthToken = "";
public string SeafileRepoID = "";
public string SeafilePath = "/";
public bool SeafileIsLibraryEncrypted = false;
public string SeafileEncryptedLibraryPassword = "";
public bool SeafileCreateShareableURL = true;
public bool SeafileCreateShareableURLRaw = false;
public bool SeafileIgnoreInvalidCert = false;
2015-10-16 21:23:30 +13:00
public int SeafileShareDaysToExpire = 0;
public string SeafileSharePassword = "";
public string SeafileAccInfoEmail = "";
public string SeafileAccInfoUsage = "";
2018-03-01 11:52:11 +13:00
#endregion Seafile
#region Streamable
2015-12-02 07:02:06 +13:00
public bool StreamableAnonymous = true;
2015-12-02 07:02:06 +13:00
public string StreamableUsername = "";
public string StreamablePassword = "";
public bool StreamableUseDirectURL = false;
2015-12-02 07:02:06 +13:00
2018-03-01 11:52:11 +13:00
#endregion Streamable
#region Azure Storage
2017-01-27 00:41:49 +13:00
public string AzureStorageAccountName = "";
public string AzureStorageAccountAccessKey = "";
public string AzureStorageContainer = "";
public string AzureStorageEnvironment = "blob.core.windows.net";
2017-07-07 12:58:14 +12:00
public string AzureStorageCustomDomain = "";
public string AzureStorageUploadPath = "";
2017-01-27 00:41:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Azure Storage
#region Backblaze B2
public string B2ApplicationKeyId = "";
public string B2ApplicationKey = "";
public string B2BucketName = "";
2019-09-04 18:55:05 +12:00
public string B2UploadPath = "ShareX/%y/%mo";
public bool B2UseCustomUrl = false;
2019-09-04 18:55:05 +12:00
public string B2CustomUrl = "https://example.com";
#endregion Backblaze B2
#region Plik
2017-02-27 05:17:02 +13:00
2017-02-27 13:02:39 +13:00
public PlikSettings PlikSettings = new PlikSettings();
2017-02-27 05:17:02 +13:00
2018-03-01 11:52:11 +13:00
#endregion Plik
2018-04-10 12:49:40 +12:00
#region YouTube
public OAuth2Info YouTubeOAuth2Info = null;
public YouTubeVideoPrivacy YouTubePrivacyType = YouTubeVideoPrivacy.Public;
2018-04-12 22:09:35 +12:00
public bool YouTubeUseShortenedLink = false;
2018-04-10 12:49:40 +12:00
#endregion YouTube
#region Google Cloud Storage
public OAuth2Info GoogleCloudStorageOAuth2Info = null;
public string GoogleCloudStorageBucket = "";
public string GoogleCloudStorageDomain = "";
2018-04-21 08:39:14 +12:00
public string GoogleCloudStorageObjectPrefix = "ShareX/%y/%mo";
public bool GoogleCloudStorageRemoveExtensionImage = false;
public bool GoogleCloudStorageRemoveExtensionVideo = false;
public bool GoogleCloudStorageRemoveExtensionText = false;
2019-04-08 08:42:47 +12:00
public bool GoogleCloudStorageSetPublicACL = true;
#endregion Google Cloud Storage
2013-11-03 23:53:49 +13:00
#endregion File uploaders
#region URL shorteners
#region bit.ly
2013-12-21 04:59:26 +13:00
public OAuth2Info BitlyOAuth2Info = null;
2016-05-25 06:15:45 +12:00
public string BitlyDomain = "";
2013-12-21 04:59:26 +13:00
2018-03-01 11:52:11 +13:00
#endregion bit.ly
#region yourls.org
public string YourlsAPIURL = "http://yoursite.com/yourls-api.php";
2016-05-25 06:15:45 +12:00
public string YourlsSignature = "";
public string YourlsUsername = "";
public string YourlsPassword = "";
2018-03-01 11:52:11 +13:00
#endregion yourls.org
#region adf.ly
2016-05-25 06:15:45 +12:00
public string AdFlyAPIKEY = "";
public string AdFlyAPIUID = "";
2014-07-13 23:10:42 +12:00
2018-03-01 11:52:11 +13:00
#endregion adf.ly
#region polr
2016-05-25 06:15:45 +12:00
public string PolrAPIHostname = "";
public string PolrAPIKey = "";
2016-12-30 02:01:03 +13:00
public bool PolrIsSecret = false;
public bool PolrUseAPIv1 = false;
2015-08-05 06:49:07 +12:00
2018-03-01 11:52:11 +13:00
#endregion polr
#region Firebase Dynamic Links
public string FirebaseWebAPIKey = "";
public string FirebaseDynamicLinkDomain = "";
2018-04-09 16:00:32 +12:00
public bool FirebaseIsShort = false;
#endregion Firebase Dynamic Links
2018-10-02 12:11:53 +13:00
#region Kutt
public KuttSettings KuttSettings = new KuttSettings();
#endregion Kutt
2013-11-03 23:53:49 +13:00
#endregion URL shorteners
#region Other uploaders
2013-11-03 23:53:49 +13:00
#region Twitter
2013-11-03 23:53:49 +13:00
public List<OAuthInfo> TwitterOAuthInfoList = new List<OAuthInfo>();
public int TwitterSelectedAccount = 0;
2015-04-28 19:50:41 +12:00
public bool TwitterSkipMessageBox = false;
2016-05-25 06:15:45 +12:00
public string TwitterDefaultMessage = "";
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Twitter
2013-11-03 23:53:49 +13:00
#region Custom uploaders
2013-11-03 23:53:49 +13:00
public List<CustomUploaderItem> CustomUploadersList = new List<CustomUploaderItem>();
public int CustomImageUploaderSelected = 0;
public int CustomTextUploaderSelected = 0;
public int CustomFileUploaderSelected = 0;
public int CustomURLShortenerSelected = 0;
2017-09-10 22:55:21 +12:00
public int CustomURLSharingServiceSelected = 0;
2013-11-03 23:53:49 +13:00
#endregion Custom uploaders
#endregion Other uploaders
2013-11-03 23:53:49 +13:00
}
2016-07-30 06:54:21 +12:00
}