fix:图片的域名处理

This commit is contained in:
李亮亮 2024-01-15 16:20:03 +08:00
parent 92d0c302a5
commit 40f9c56038
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ router.post('/list', auth, async (req: Request, env: Env) => {
const objs = list.objects const objs = list.objects
const urls = objs.map(it => { const urls = objs.map(it => {
return <ImgItem>{ return <ImgItem>{
url: BASE_URL + `${include}/${it.key}`, url: `${BASE_URL}/${it.key}`,
key: it.key, key: it.key,
size: it.size size: it.size
} }
@ -114,7 +114,7 @@ router.post('/upload', auth, async (req: Request, env: Env) => {
urls.push({ urls.push({
key: object.key, key: object.key,
size: object.size, size: object.size,
url: BASE_URL + `/${object.key}`, url: `${BASE_URL}/${object.key}`,
filename: item.name filename: item.name
}) })
} }