mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 11:08:13 -05:00
✨ Feature(custom): manage page auto import support build-in s3
This commit is contained in:
parent
d1e27924a5
commit
48ec494e73
@ -577,7 +577,7 @@ function handleConfigImport (alias: string) {
|
|||||||
async function getCurrentConfigList () {
|
async function getCurrentConfigList () {
|
||||||
await manageStore.refreshConfig()
|
await manageStore.refreshConfig()
|
||||||
const configList = await getPicBedsConfig<any>('uploader') ?? {}
|
const configList = await getPicBedsConfig<any>('uploader') ?? {}
|
||||||
const pbList = ['aliyun', 'aws-s3', 'github', 'imgur', 'local', 'qiniu', 'sftpplist', 'smms', 'tcyun', 'upyun', 'webdavplist']
|
const pbList = ['aliyun', 'aws-s3', 'aws-s3-plist', 'github', 'imgur', 'local', 'qiniu', 'sftpplist', 'smms', 'tcyun', 'upyun', 'webdavplist']
|
||||||
|
|
||||||
const filteredConfigList = pbList.flatMap((pb) => {
|
const filteredConfigList = pbList.flatMap((pb) => {
|
||||||
const config = configList[pb]
|
const config = configList[pb]
|
||||||
@ -615,7 +615,7 @@ async function transUpToManage (config: IUploaderConfigListItem, picBedName: str
|
|||||||
? 'webdav'
|
? 'webdav'
|
||||||
: picBedName === 'sftpplist'
|
: picBedName === 'sftpplist'
|
||||||
? 'sftp'
|
? 'sftp'
|
||||||
: picBedName === 'aws-s3'
|
: picBedName === 'aws-s3' || picBedName === 'aws-s3-plist'
|
||||||
? 's3plist'
|
? 's3plist'
|
||||||
: picBedName}-${config._configName ?? 'Default'}-imp`
|
: picBedName}-${config._configName ?? 'Default'}-imp`
|
||||||
if (!autoImportPicBed.includes(picBedName) || isImported(alias)) return
|
if (!autoImportPicBed.includes(picBedName) || isImported(alias)) return
|
||||||
@ -797,6 +797,7 @@ async function transUpToManage (config: IUploaderConfigListItem, picBedName: str
|
|||||||
delete resultMap.paging
|
delete resultMap.paging
|
||||||
break
|
break
|
||||||
case 'aws-s3':
|
case 'aws-s3':
|
||||||
|
case 'aws-s3-plist':
|
||||||
if (!config.accessKeyID || !config.secretAccessKey) return
|
if (!config.accessKeyID || !config.secretAccessKey) return
|
||||||
Object.assign(resultMap, {
|
Object.assign(resultMap, {
|
||||||
...commonConfig,
|
...commonConfig,
|
||||||
|
Loading…
Reference in New Issue
Block a user