We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d065d8e commit 544c186Copy full SHA for 544c186
src/lib/components/v2/projects/datasets/DatasetImagesTable.svelte
@@ -611,6 +611,16 @@
611
}
612
return false;
613
614
+
615
+ /**
616
+ * @param {string} zarrUrl
617
+ */
618
+ function encodePathForUrl(zarrUrl) {
619
+ let encodedPath = encodeURIComponent(zarrUrl);
620
+ // Replace encoded slashes back to slashes
621
+ encodedPath = encodedPath.replace(/%2F/g, '/');
622
+ return encodedPath;
623
+ }
624
</script>
625
626
{#if !showTable}
@@ -759,7 +769,9 @@
759
769
{#if vizarrViewerUrl}
760
770
<a
761
771
class="btn btn-info"
762
- href="{vizarrViewerUrl}?source={vizarrViewerUrl}data{image.zarr_url}"
772
+ href="{vizarrViewerUrl}?source={vizarrViewerUrl}data{encodePathForUrl(
773
+ image.zarr_url
774
+ )}"
763
775
target="_blank"
764
776
>
765
777
<i class="bi bi-eye" />
0 commit comments