aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/ts/truncate.worker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/lib/ts/truncate.worker.ts')
-rw-r--r--app/src/lib/ts/truncate.worker.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/lib/ts/truncate.worker.ts b/app/src/lib/ts/truncate.worker.ts
index ad00011..eaa65fe 100644
--- a/app/src/lib/ts/truncate.worker.ts
+++ b/app/src/lib/ts/truncate.worker.ts
@@ -1,9 +1,11 @@
import type { TruncateRequest, TruncateResponse } from '../types/truncate-worker';
onmessage = async (message: MessageEvent<TruncateRequest>) => {
+ console.log('File received. Truncating...');
const file = message.data.file;
const buffer = await file.arrayBuffer();
const truncated = buffer.slice(0, message.data.size);
-
postMessage({ file: truncated } as TruncateResponse);
};
+
+console.log('Worker successfully loaded!');