Skip to content

Commit

Permalink
fix: thumbnail URI encoding (fluidd-core#622)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas authored and matmen committed Jun 27, 2022
1 parent f86e32f commit 7c9e40e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const getThumb = (thumbnails: Thumbnail[], path: string, large = true) =>
if (thumb.relative_path && thumb.relative_path.length > 0) {
const url = new URL(apiUrl ?? document.location.origin)
url.pathname = (path === '')
? `/server/files/gcodes/${thumb.relative_path}`
: `/server/files/gcodes/${path}/${thumb.relative_path}`
? `/server/files/gcodes/${encodeURI(thumb.relative_path)}`
: `/server/files/gcodes/${encodeURI(path)}/${encodeURI(thumb.relative_path)}`

return {
...thumb,
Expand Down

0 comments on commit 7c9e40e

Please sign in to comment.