上传配置结构
上传配置文件的结构如下
typescript
{
picBed: {
uploader: string
current?: string
smms?: {
token: string
backupDomain?: string
}
qiniu?: {
accessKey: string
secretKey: string
bucket: string
url: string
area: 'z0' | 'z1' | 'z2' | 'na0' | 'as0' | string
options: string
path: string
}
upyun?: {
bucket: string
operator: string
password: string
options: string
path: string
url: string
antiLeechToken: string
expireTime: number
endpoint: string
}
tcyun?: {
secretId: string
secretKey: string
bucket: string
appId: string
endpoint: string
area: string
path: string
customUrl: string
version: 'v4' | 'v5'
options: string
slim: boolean
}
github?: {
repo: string
token: string
path: string
customUrl: string
branch: string
}
aliyun?: {
accessKeyId: string
accessKeySecret: string
bucket: string
area: string
path: string
customUrl: string
options: string
}
imgur?: {
clientId: string
proxy: string
username: string
accessToken: string
album: string
}
webdavplist?: {
host: string
sslEnabled: boolean
username: string
password: string
path: string
webpath: string
customUrl: string
authType: string
options: string
}
local?: {
path: string
customUrl?: string
webPath?: string
}
sftpplist?: {
host: string
port?: number
username: string
password?: string
privateKey?: string
passphrase?: string
uploadPath?: string
customUrl?: string
webPath?: string
fileUser?: string
fileMode?: string
dirMode?: string
}
lskyplist?: {
version: string
host: string
token: string
strategyId: string
albumId: string
permission: {
[propName: string]: any
}
}
'aws-s3-plist': {
accessKeyID: string
secretAccessKey: string
bucketName: string
uploadPath: string
region?: string
endpoint?: string
proxy?: string
urlPrefix?: string
pathStyleAccess?: boolean
rejectUnauthorized?: boolean
acl?: string
disableBucketPrefixToURL?: boolean | string
}
proxy?: string
transformer?: string
list: {
type: string
name: string
visible: boolean
}[]
[others: string]: any
},
settings: {
shortKey: {
[key: string]: {
enable: boolean
key: string // 按键
name: string
label: string
from?: string
}
}
logLevel: string[]
logPath: string
logFileSizeLimit: number
isAutoListenClipboard: boolean
isListeningClipboard: boolean
showUpdateTip: boolean
miniWindowPosition: [number, number]
miniWindowOntop: boolean
mainWindowWidth: number
mainWindowHeight: number
isHideDock: boolean
autoCloseMiniWindow: boolean
autoCloseMainWindow: boolean
isCustomMiniIcon: boolean
customMiniIcon: string
startMode: 'quiet' | 'mini' | 'main' | 'no-tray'
autoRename: boolean
deleteCloudFile: boolean
server: {
port: number | string
host: string
enable: boolean
}
serverKey: string
pasteStyle: 'markdown' | 'HTML' | 'URL' | 'UBB' | 'Custom'
aesPassword: string
rename: boolean
sync: {
type: string
file?: string
username: string
repo: string
branch: string
token: string
endpoint?: string
proxy?: string
interval?: number
}
tempDirPath: string
language: 'zh-CN' | 'zh-TW' | 'en'
customLink: string
manualPageOpen: 'window' | 'browser'
encodeOutputURL: boolean
useShortUrl: boolean
shortUrlServer: 'c1n' | 'yourls' | 'cf_worker'
c1nToken: string
cfWorkerHost: string
yourlsDomain: string
yourlsSignature: string
isSilentNotice: boolean
proxy: string
registry: string
autoCopy: boolean
enableWebServer: boolean
webServerHost: string
webServerPort: number
webServerPath: string
deleteLocalFile: boolean
uploadResultNotification: boolean
uploadNotification: boolean
useBuiltinClipboard: boolean
autoStart: boolean
autoImport: boolean
autoImportPicBed: string[]
}
needReload: boolean
picgoPlugins: {
[key: `picgo-plugin-${string}`]: boolean
}
uploader: {
[picBedType: string]: {
configList: {
_id: string
_configName: string
_updatedAt: number
_createdAt: number
[propName: string]: any
}[]
defaultId: string
}
}
buildIn: {
compress: {
quality?: number;
isConvert?: boolean;
convertFormat?: 'avif' | 'dz' | 'fits' | 'gif' | 'heif' | 'input' | 'jpeg' | 'jpg' | 'jp2' | 'jxl' | 'magick' | 'openslide' | 'pdf' | 'png' | 'ppm' | 'raw' | 'svg' | 'tiff' | 'tif' | 'v' | 'webp'
isReSize?: boolean;
reSizeWidth?: number;
reSizeHeight?: number;
skipReSizeOfSmallImg?: boolean;
isReSizeByPercent?: boolean;
reSizePercent?: number;
isRotate?: boolean;
rotateDegree?: number;
isRemoveExif?: boolean;
isFlip?: boolean;
isFlop?: boolean;
[propName: string]: any;
}
watermark: {
isAddWatermark?: boolean;
watermarkType?: 'text' | 'image';
isFullScreenWatermark?: boolean;
watermarkDegree?: number;
watermarkText?: string;
watermarkFontPath?: string;
watermarkScaleRatio?: number;
watermarkColor?: string;
watermarkImagePath?: string;
watermarkPosition?: 'north' | 'northwest' | 'southeast' | 'south' | 'southwest' | 'east' | 'west' | 'center' | 'northwest' | 'centre'
}
rename: {
enable: boolean
format: string
}
}
debug: boolean
PICGO_ENV: string
}