mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
@@ -94,6 +94,9 @@ try {
|
||||
},
|
||||
mime: {
|
||||
lookup: mime.getType
|
||||
},
|
||||
buffer: {
|
||||
from: Buffer.from
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
@@ -61,7 +61,8 @@ async function getWebdavHeader(key: string) {
|
||||
}
|
||||
} else {
|
||||
headers = {
|
||||
Authorization: 'Basic ' + Buffer.from(`${props.config.username}:${props.config.password}`).toString('base64')
|
||||
Authorization:
|
||||
'Basic ' + window.node.buffer.from(`${props.config.username}:${props.config.password}`).toString('base64')
|
||||
}
|
||||
}
|
||||
return headers
|
||||
|
||||
@@ -1756,7 +1756,7 @@ async function handleClickFile(item: any) {
|
||||
const options = {} as any
|
||||
if (currentPicBedName.value === 'webdavplist') {
|
||||
options.headers = {
|
||||
Authorization: `Basic ${Buffer.from(`${manageStore.config.picBed[configMap.alias].username}:${manageStore.config.picBed[configMap.alias].password}`).toString('base64')}`
|
||||
Authorization: `Basic ${window.node.buffer.from(`${manageStore.config.picBed[configMap.alias].username}:${manageStore.config.picBed[configMap.alias].password}`).toString('base64')}`
|
||||
}
|
||||
}
|
||||
if (item.isImage) {
|
||||
|
||||
3
src/universal/types/shims-tsx.d.ts
vendored
3
src/universal/types/shims-tsx.d.ts
vendored
@@ -63,6 +63,9 @@ declare global {
|
||||
mime: {
|
||||
lookup: typeof mime.getType
|
||||
}
|
||||
buffer: {
|
||||
from: typeof Buffer.from
|
||||
}
|
||||
}
|
||||
i18n: {
|
||||
setLocales: (lang: string, locales: ILocales) => void
|
||||
|
||||
Reference in New Issue
Block a user