refactor: un-hardcode file urls

This commit is contained in:
Zoe
2026-05-12 10:28:33 -05:00
parent 9550d44220
commit 47009b1f0a
11 changed files with 2790 additions and 15 deletions
+7
View File
@@ -0,0 +1,7 @@
export const resolveFileUrl = (path: string): string => {
if (path.startsWith('http://') || path.startsWith('https://') || path.startsWith('blob:') || path.startsWith('data:')) {
return path;
}
const config = useRuntimeConfig();
return `${config.public.publicUrl}${path}`;
};