This commit is contained in:
Timothy Jaeryang Baek
2025-04-11 15:27:25 -07:00
parent c846a550fa
commit c5636ff68c
5 changed files with 49 additions and 13 deletions

View File

@@ -547,6 +547,14 @@
dropZone?.removeEventListener('drop', onDrop);
dropZone?.removeEventListener('dragleave', onDragLeave);
});
const decodeString = (str: string) => {
try {
return decodeURIComponent(str);
} catch (e) {
return str;
}
};
</script>
{#if dragged}
@@ -698,7 +706,7 @@
href={selectedFile.id ? `/api/v1/files/${selectedFile.id}/content` : '#'}
target="_blank"
>
{decodeURIComponent(selectedFile?.meta?.name)}
{decodeString(selectedFile?.meta?.name)}
</a>
</div>