mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
fix: fix decoding issue in attachment route
This commit is contained in:
@@ -211,7 +211,7 @@ const attachment = async (ctx: any, next: any) => {
|
||||
if (!repo || !path) {
|
||||
const filePath = ctx.path.replace('/api/attachment', '')
|
||||
const arr = filePath.split('/')
|
||||
repo = arr[1]
|
||||
repo = decodeURIComponent(arr[1] || '')
|
||||
path = decodeURI(arr.slice(2).join('/'))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user