No longer serialize binary blobs as data URLs

This commit is contained in:
Zef Hemel
2023-05-26 14:04:32 +02:00
parent 25c789538d
commit 1a1b942f92
10 changed files with 34 additions and 94 deletions
-3
View File
@@ -77,9 +77,6 @@ async function actionClickOrActionEnter(
}
if (url.indexOf("://") === -1 && !url.startsWith("mailto:")) {
url = decodeURIComponent(url);
// // attachment URL, let's fetch as a data url
// const dataUrl = await space.readAttachment(url);
// return editor.downloadFile(url, dataUrl);
return editor.openUrl(`/.fs/${url}`);
} else {
await editor.openUrl(url);
+1 -2
View File
@@ -57,8 +57,7 @@ export async function updatePlugsCommand() {
// console.log("Writing", `_plug/${plugName}.plug.js`, workerCode);
await space.writeAttachment(
`_plug/${plugName}.plug.js`,
"utf8",
workerCode,
new TextEncoder().encode(workerCode),
);
}