1
Fork 0

Add support for custom base path to URL generator

This commit is contained in:
David Valdez 2023-04-26 04:41:08 +00:00
parent cb44e8572f
commit 31f1810e5e
1 changed files with 1 additions and 1 deletions

View File

@ -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) {