chore: initial import

This commit is contained in:
liangjian
2026-06-29 09:42:53 +08:00
commit 9fea127de1
241 changed files with 82767 additions and 0 deletions

10
utils/common.js Normal file
View File

@@ -0,0 +1,10 @@
import { config } from '../config.js'
export function addFilePrefix(url = '') {
const value = String(url || '').trim()
if (!value) return ''
if (/^(https?:\/\/|data:image|blob:)/i.test(value)) {
return value
}
return `${config.filePrefix}${value.startsWith('/') ? '' : '/'}${value}`
}