ShareX/ShareX.UploadersLib/UploadersConfig.cs

509 lines
17 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
2024-01-03 12:57:14 +13:00
Copyright (c) 2007-2024 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)
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
2020-06-01 13:17:04 +12:00
public OAuth2Info DropboxOAuth2Info { get; set; } = null;
public string DropboxUploadPath { get; set; } = "ShareX/%y/%mo";
public bool DropboxAutoCreateShareableLink { get; set; } = true;
public bool DropboxUseDirectLink { get; set; } = false;
2018-03-01 11:52:11 +13:00
#endregion Dropbox
#region FTP
2016-06-12 06:54:14 +12:00
2020-06-01 13:17:04 +12:00
public List<FTPAccount> FTPAccountList { get; set; } = new List<FTPAccount>();
public int FTPSelectedImage { get; set; } = 0;
public int FTPSelectedText { get; set; } = 0;
public int FTPSelectedFile { get; set; } = 0;
2016-06-12 06:54:14 +12:00
2018-03-01 11:52:11 +13:00
#endregion FTP
#region OneDrive
2014-07-16 00:17:02 +12:00
2020-06-01 13:17:04 +12:00
public OAuth2Info OneDriveV2OAuth2Info { get; set; } = null;
public OneDriveFileInfo OneDriveV2SelectedFolder { get; set; } = OneDrive.RootFolder;
public bool OneDriveAutoCreateShareableLink { get; set; } = true;
2023-10-13 00:33:23 +13:00
public bool OneDriveUseDirectLink { get; set; } = false;
2014-07-16 00:17:02 +12:00
2018-03-01 11:52:11 +13:00
#endregion OneDrive
#region Google Drive
2013-11-03 23:53:49 +13:00
2020-06-01 13:17:04 +12:00
public OAuth2Info GoogleDriveOAuth2Info { get; set; } = null;
public OAuthUserInfo GoogleDriveUserInfo { get; set; } = null;
2020-06-01 13:17:04 +12:00
public bool GoogleDriveIsPublic { get; set; } = true;
public bool GoogleDriveDirectLink { get; set; } = false;
public bool GoogleDriveUseFolder { get; set; } = false;
public string GoogleDriveFolderID { get; set; } = "";
public GoogleDriveSharedDrive GoogleDriveSelectedDrive { get; set; } = GoogleDrive.MyDrive;
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
2020-06-01 13:17:04 +12:00
[JsonEncrypt]
public string PuushAPIKey { get; set; } = "";
2016-06-12 06:54:14 +12:00
2018-03-01 11:52:11 +13:00
#endregion puush
#region SendSpace
2013-11-03 23:53:49 +13:00
2020-06-01 13:17:04 +12:00
public AccountType SendSpaceAccountType { get; set; } = AccountType.Anonymous;
public string SendSpaceUsername { get; set; } = "";
[JsonEncrypt]
public string SendSpacePassword { get; set; } = "";
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
2020-06-01 13:17:04 +12:00
public OAuth2Info BoxOAuth2Info { get; set; } = null;
public BoxFileEntry BoxSelectedFolder { get; set; } = Box.RootFolder;
public bool BoxShare { get; set; } = true;
public BoxShareAccessLevel BoxShareAccessLevel { get; set; } = BoxShareAccessLevel.Open;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Box
#region Localhostr
2013-11-03 23:53:49 +13:00
2020-06-01 13:17:04 +12:00
public string LocalhostrEmail { get; set; } = "";
[JsonEncrypt]
public string LocalhostrPassword { get; set; } = "";
public bool LocalhostrDirectURL { get; set; } = true;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Localhostr
#region Shared folder
2013-11-03 23:53:49 +13:00
2020-06-01 13:17:04 +12:00
public List<LocalhostAccount> LocalhostAccountList { get; set; } = new List<LocalhostAccount>();
public int LocalhostSelectedImages { get; set; } = 0;
public int LocalhostSelectedText { get; set; } = 0;
public int LocalhostSelectedFiles { get; set; } = 0;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Shared folder
#region Email
2013-11-03 23:53:49 +13:00
2020-06-01 13:17:04 +12:00
public string EmailSmtpServer { get; set; } = "smtp.gmail.com";
public int EmailSmtpPort { get; set; } = 587;
public string EmailFrom { get; set; } = "...@gmail.com";
[JsonEncrypt]
public string EmailPassword { get; set; } = "";
public bool EmailRememberLastTo { get; set; } = true;
public string EmailLastTo { get; set; } = "";
public string EmailDefaultSubject { get; set; } = "Sending email from ShareX";
public string EmailDefaultBody { get; set; } = "Screenshot is attached.";
public bool EmailAutomaticSend { get; set; } = false;
public string EmailAutomaticSendTo { get; set; } = "";
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
2020-06-01 13:17:04 +12:00
public string JiraHost { get; set; } = "http://";
public string JiraIssuePrefix { get; set; } = "PROJECT-";
public OAuthInfo JiraOAuthInfo { get; set; } = null;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Jira
#region Mega
2013-11-03 23:53:49 +13:00
2020-06-01 13:17:04 +12:00
public MegaAuthInfos MegaAuthInfos { get; set; } = null;
public string MegaParentNodeId { get; set; } = null;
2013-11-03 23:53:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Mega
#region Amazon S3
2014-03-27 05:56:05 +13:00
2020-06-01 13:17:04 +12:00
public AmazonS3Settings AmazonS3Settings { get; set; } = new AmazonS3Settings()
2014-03-29 01:55:41 +13:00
{
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
2020-06-01 13:17:04 +12:00
public string OwnCloudHost { get; set; } = "";
public string OwnCloudUsername { get; set; } = "";
[JsonEncrypt]
public string OwnCloudPassword { get; set; } = "";
public string OwnCloudPath { get; set; } = "/";
public int OwnCloudExpiryTime { get; set; } = 7;
public bool OwnCloudCreateShare { get; set; } = true;
public bool OwnCloudDirectLink { get; set; } = false;
public bool OwnCloud81Compatibility { get; set; } = true;
public bool OwnCloudUsePreviewLinks { get; set; } = false;
2021-12-29 02:35:47 +13:00
public bool OwnCloudAppendFileNameToURL { get; set; } = false;
2020-06-01 13:17:04 +12:00
public bool OwnCloudAutoExpire { get; set; } = 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
2020-06-01 13:17:04 +12:00
public string MediaFireUsername { get; set; } = "";
[JsonEncrypt]
public string MediaFirePassword { get; set; } = "";
public string MediaFirePath { get; set; } = "";
public bool MediaFireUseLongLink { get; set; } = false;
2014-07-23 10:32:14 +12:00
2018-03-01 11:52:11 +13:00
#endregion MediaFire
#region Pushbullet
2020-06-01 13:17:04 +12:00
public PushbulletSettings PushbulletSettings { get; set; } = new PushbulletSettings();
2018-03-01 11:52:11 +13:00
#endregion Pushbullet
#region Lambda
2015-02-04 09:12:53 +13:00
2020-06-01 13:17:04 +12:00
public LambdaSettings LambdaSettings { get; set; } = new LambdaSettings();
2015-02-04 09:12:53 +13:00
2018-03-01 11:52:11 +13:00
#endregion Lambda
#region LobFile
2022-02-04 00:23:32 +13:00
public LobFileSettings LithiioSettings { get; set; } = new LobFileSettings();
#endregion
#region Pomf
2020-06-01 13:17:04 +12:00
public PomfUploader PomfUploader { get; set; } = new PomfUploader();
2018-03-01 11:52:11 +13:00
#endregion Pomf
#region s-ul
2015-12-12 15:30:12 +13:00
2020-06-01 13:17:04 +12:00
[JsonEncrypt]
public string SulAPIKey { get; set; } = "";
2015-12-12 15:30:12 +13:00
2018-03-01 11:52:11 +13:00
#endregion s-ul
#region Seafile
2020-06-01 13:17:04 +12:00
public string SeafileAPIURL { get; set; } = "";
[JsonEncrypt]
public string SeafileAuthToken { get; set; } = "";
public string SeafileRepoID { get; set; } = "";
public string SeafilePath { get; set; } = "/";
public bool SeafileIsLibraryEncrypted { get; set; } = false;
[JsonEncrypt]
public string SeafileEncryptedLibraryPassword { get; set; } = "";
public bool SeafileCreateShareableURL { get; set; } = true;
public bool SeafileCreateShareableURLRaw { get; set; } = false;
public bool SeafileIgnoreInvalidCert { get; set; } = false;
public int SeafileShareDaysToExpire { get; set; } = 0;
[JsonEncrypt]
public string SeafileSharePassword { get; set; } = "";
public string SeafileAccInfoEmail { get; set; } = "";
public string SeafileAccInfoUsage { get; set; } = "";
2018-03-01 11:52:11 +13:00
#endregion Seafile
#region Streamable
2015-12-02 07:02:06 +13:00
2020-06-01 13:17:04 +12:00
public string StreamableUsername { get; set; } = "";
[JsonEncrypt]
public string StreamablePassword { get; set; } = "";
public bool StreamableUseDirectURL { get; set; } = 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
2020-06-01 13:17:04 +12:00
public string AzureStorageAccountName { get; set; } = "";
[JsonEncrypt]
public string AzureStorageAccountAccessKey { get; set; } = "";
public string AzureStorageContainer { get; set; } = "";
public string AzureStorageEnvironment { get; set; } = "blob.core.windows.net";
public string AzureStorageCustomDomain { get; set; } = "";
public string AzureStorageUploadPath { get; set; } = "";
public string AzureStorageCacheControl { get; set; } = "";
2017-01-27 00:41:49 +13:00
2018-03-01 11:52:11 +13:00
#endregion Azure Storage
#region Backblaze B2
2020-06-01 13:17:04 +12:00
public string B2ApplicationKeyId { get; set; } = "";
[JsonEncrypt]
public string B2ApplicationKey { get; set; } = "";
public string B2BucketName { get; set; } = "";
public string B2UploadPath { get; set; } = "ShareX/%y/%mo";
public bool B2UseCustomUrl { get; set; } = false;
public string B2CustomUrl { get; set; } = "https://example.com";
#endregion Backblaze B2
#region Plik
2017-02-27 05:17:02 +13:00
2020-06-01 13:17:04 +12:00
public PlikSettings PlikSettings { get; set; } = 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
2020-06-01 13:17:04 +12:00
public OAuth2Info YouTubeOAuth2Info { get; set; } = null;
2022-12-09 00:48:35 +13:00
public OAuthUserInfo YouTubeUserInfo { get; set; } = null;
2020-06-01 13:17:04 +12:00
public YouTubeVideoPrivacy YouTubePrivacyType { get; set; } = YouTubeVideoPrivacy.Public;
public bool YouTubeUseShortenedLink { get; set; } = false;
public bool YouTubeShowDialog { get; set; } = false;
2018-04-10 12:49:40 +12:00
#endregion YouTube
#region Google Cloud Storage
2020-06-01 13:17:04 +12:00
public OAuth2Info GoogleCloudStorageOAuth2Info { get; set; } = null;
public OAuthUserInfo GoogleCloudStorageUserInfo { get; set; } = null;
2020-06-01 13:17:04 +12:00
public string GoogleCloudStorageBucket { get; set; } = "";
public string GoogleCloudStorageDomain { get; set; } = "";
public string GoogleCloudStorageObjectPrefix { get; set; } = "ShareX/%y/%mo";
public bool GoogleCloudStorageRemoveExtensionImage { get; set; } = false;
public bool GoogleCloudStorageRemoveExtensionVideo { get; set; } = false;
public bool GoogleCloudStorageRemoveExtensionText { get; set; } = false;
public bool GoogleCloudStorageSetPublicACL { get; set; } = 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
2020-06-01 22:36:55 +12:00
public OAuth2Info BitlyOAuth2Info { get; set; } = null;
public string BitlyDomain { get; set; } = "";
2013-12-21 04:59:26 +13:00
2018-03-01 11:52:11 +13:00
#endregion bit.ly
#region yourls.org
2020-06-01 22:36:55 +12:00
public string YourlsAPIURL { get; set; } = "http://yoursite.com/yourls-api.php";
[JsonEncrypt]
public string YourlsSignature { get; set; } = "";
public string YourlsUsername { get; set; } = "";
[JsonEncrypt]
public string YourlsPassword { get; set; } = "";
2018-03-01 11:52:11 +13:00
#endregion yourls.org
#region adf.ly
2020-06-01 22:36:55 +12:00
public string AdFlyAPIUID { get; set; } = "";
[JsonEncrypt]
public string AdFlyAPIKEY { get; set; } = "";
2014-07-13 23:10:42 +12:00
2018-03-01 11:52:11 +13:00
#endregion adf.ly
#region polr
2020-06-01 22:36:55 +12:00
public string PolrAPIHostname { get; set; } = "";
[JsonEncrypt]
public string PolrAPIKey { get; set; } = "";
public bool PolrIsSecret { get; set; } = false;
public bool PolrUseAPIv1 { get; set; } = false;
2015-08-05 06:49:07 +12:00
2018-03-01 11:52:11 +13:00
#endregion polr
#region Firebase Dynamic Links
2020-06-01 22:36:55 +12:00
[JsonEncrypt]
public string FirebaseWebAPIKey { get; set; } = "";
public string FirebaseDynamicLinkDomain { get; set; } = "";
public bool FirebaseIsShort { get; set; } = false;
#endregion Firebase Dynamic Links
2018-10-02 12:11:53 +13:00
#region Kutt
2020-06-01 22:36:55 +12:00
public KuttSettings KuttSettings { get; set; } = new KuttSettings();
2018-10-02 12:11:53 +13:00
#endregion Kutt
#region Zero Width Shortener
public string ZeroWidthShortenerURL { get; set; } = "https://api.zws.im";
public string ZeroWidthShortenerToken { get; set; } = "";
#endregion
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
2020-06-01 22:36:55 +12:00
public List<OAuthInfo> TwitterOAuthInfoList { get; set; } = new List<OAuthInfo>();
public int TwitterSelectedAccount { get; set; } = 0;
public bool TwitterSkipMessageBox { get; set; } = false;
public string TwitterDefaultMessage { get; set; } = "";
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
2020-06-01 22:36:55 +12:00
public List<CustomUploaderItem> CustomUploadersList { get; set; } = new List<CustomUploaderItem>();
public int CustomImageUploaderSelected { get; set; } = 0;
public int CustomTextUploaderSelected { get; set; } = 0;
public int CustomFileUploaderSelected { get; set; } = 0;
public int CustomURLShortenerSelected { get; set; } = 0;
public int CustomURLSharingServiceSelected { get; set; } = 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
}