A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: reduce chunk size to 512KB
thecodrr3252725b1259
diff --git a/apps/web/package.json b/apps/web/package.jsonindex 5203f6c07..35387d46c 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -57,6 +57,7 @@"timeago-react": "^3.0.2","tinymce": "5.8.1","uzip": "^0.20201231.0",+ "web-streams-polyfill": "^3.1.1","worker-loader": "^3.0.8","wouter": "^2.7.3","xxhash-wasm": "^0.4.2",diff --git a/apps/web/src/app-effects.js b/apps/web/src/app-effects.jsindex 6b8988d85..a4737086f 100644--- a/apps/web/src/app-effects.js+++ b/apps/web/src/app-effects.js@@ -80,7 +80,6 @@ function AppEffects({ isMobile, isTablet, setShow, slideToIndex }) {const progressEvent = AppEventManager.subscribe(AppEvents.UPDATE_ATTACHMENT_PROGRESS,({ type, total, loaded }) => {- console.log(type, total, loaded);const [key] = getProcessingStatusFromType(type);if (!key) return;diff --git a/apps/web/src/interfaces/fs.js b/apps/web/src/interfaces/fs.jsindex 9678b60a2..55bb3a5b3 100644--- a/apps/web/src/interfaces/fs.js+++ b/apps/web/src/interfaces/fs.js@@ -4,7 +4,7 @@ import { xxhash64, createXXHash64 } from "hash-wasm";import axios from "axios";import { AppEventManager, AppEvents } from "../common";// eslint-disable-next-line import/no-webpack-loader-syntax-import "worker-loader!nncryptoworker/dist/src/worker.js";+import "worker-loader?filename=static/workers/nncrypto.worker.js!nncryptoworker/dist/src/worker.js";import { StreamableFS } from "streamablefs";import NNCrypto from "./nncrypto.stub";import hosts from "notes-core/utils/constants";@@ -13,9 +13,9 @@ import { sendAttachmentsProgressEvent } from "notes-core/common";StreamSaver.mitm = "/downloader.html";const ABYTES = 17;-const CHUNK_SIZE = 5 * 1024 * 1024;+const CHUNK_SIZE = 512 * 1024;const ENCRYPTED_CHUNK_SIZE = CHUNK_SIZE + ABYTES;-const crypto = new NNCrypto("/static/js/bundle.worker.js");+const crypto = new NNCrypto("/static/workers/nncrypto.worker.js");const streamablefs = new StreamableFS("streamable-fs");/**