mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-25 08:54:13 +00:00
fix: encoded file path on share
This commit is contained in:
parent
e017a19985
commit
7955e0720b
3 changed files with 48 additions and 31 deletions
|
|
@ -33,12 +33,8 @@ export async function fetchJSON (url, opts) {
|
|||
}
|
||||
}
|
||||
|
||||
export function removePrefix (url, prefix) {
|
||||
if (url.startsWith('/files')) {
|
||||
url = url.slice(6)
|
||||
} else if (prefix) {
|
||||
url = url.replace(prefix, '')
|
||||
}
|
||||
export function removePrefix (url) {
|
||||
url = url.split('/').splice(2).join('/')
|
||||
|
||||
if (url === '') url = '/'
|
||||
if (url[0] !== '/') url = '/' + url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue