fix bug
This commit is contained in:
@@ -84,6 +84,18 @@ export function toAbsoluteFileUrl(path?: string | null): string | undefined {
|
||||
return trimmed
|
||||
}
|
||||
|
||||
const storageMatch = trimmed.match(/(?:^|\/)storage\/(.+)$/i)
|
||||
if (storageMatch) {
|
||||
const base = getFileBaseUrl()
|
||||
if (base) {
|
||||
return `${base}/storage/${storageMatch[1]}`
|
||||
}
|
||||
}
|
||||
|
||||
if (/^[a-z0-9.-]+(?:\/server)?\/storage\//i.test(trimmed)) {
|
||||
return `https://${trimmed.replace(/^\/+/, '')}`
|
||||
}
|
||||
|
||||
const base = getFileBaseUrl()
|
||||
if (!base) return undefined
|
||||
|
||||
|
||||
Reference in New Issue
Block a user