Add support for custom base path to URL generator
This commit is contained in:
parent
cb44e8572f
commit
31f1810e5e
|
@ -13,7 +13,7 @@ const placeholder =
|
|||
const getProtectedUrl = (url?: string) => {
|
||||
if (url == undefined) return undefined
|
||||
|
||||
const imgUrl = new URL(url, location.origin)
|
||||
const imgUrl = new URL(`${import.meta.env.BASE_URL}/${url}`, location.origin)
|
||||
|
||||
const tokenRegex = location.pathname.match(/^\/share\/([\d\w]+)(\/?.*)$/)
|
||||
if (tokenRegex) {
|
||||
|
|
Loading…
Reference in New Issue