mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
@@ -94,6 +94,9 @@ try {
|
|||||||
},
|
},
|
||||||
mime: {
|
mime: {
|
||||||
lookup: mime.getType
|
lookup: mime.getType
|
||||||
|
},
|
||||||
|
buffer: {
|
||||||
|
from: Buffer.from
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ async function getWebdavHeader(key: string) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
headers = {
|
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
|
return headers
|
||||||
|
|||||||
@@ -1756,7 +1756,7 @@ async function handleClickFile(item: any) {
|
|||||||
const options = {} as any
|
const options = {} as any
|
||||||
if (currentPicBedName.value === 'webdavplist') {
|
if (currentPicBedName.value === 'webdavplist') {
|
||||||
options.headers = {
|
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) {
|
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: {
|
mime: {
|
||||||
lookup: typeof mime.getType
|
lookup: typeof mime.getType
|
||||||
}
|
}
|
||||||
|
buffer: {
|
||||||
|
from: typeof Buffer.from
|
||||||
|
}
|
||||||
}
|
}
|
||||||
i18n: {
|
i18n: {
|
||||||
setLocales: (lang: string, locales: ILocales) => void
|
setLocales: (lang: string, locales: ILocales) => void
|
||||||
|
|||||||
Reference in New Issue
Block a user