From aeab77dfd41ca4791a03a134f9e4d353d8191788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Fri, 17 Nov 2023 13:30:16 +0100 Subject: [PATCH] fix public path to _file --- public/client.js | 3 ++- src/render.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/client.js b/public/client.js index f1af3a8f2..e3734901c 100644 --- a/public/client.js +++ b/public/client.js @@ -196,7 +196,8 @@ export function define(cell) { v.define(outputs.length ? `cell ${id}` : null, inputs, body); variables.push(v); for (const o of outputs) variables.push(main.define(o, [`cell ${id}`], (exports) => exports[o])); - for (const f of files) attachedFiles.set(f.name, {url: globalThis._FileAttachmentDir + `${(new URL(f.name, location)).pathname}`, mimeType: f.mimeType}); // prettier-ignore + const fadir = new URL(globalThis._FileAttachmentBase, location).href; + for (const f of files) attachedFiles.set(f.name, {url: new URL(f.name, fadir).pathname, mimeType: f.mimeType}); for (const d of databases) databaseTokens.set(d.name, d); } diff --git a/src/render.ts b/src/render.ts index 374beefe6..d26327316 100644 --- a/src/render.ts +++ b/src/render.ts @@ -74,7 +74,7 @@ ${Array.from(getImportPreloads(parseResult, path))