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))