diff options
Diffstat (limited to 'app/src/lib/ts/truncate.worker.ts')
-rw-r--r-- | app/src/lib/ts/truncate.worker.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/src/lib/ts/truncate.worker.ts b/app/src/lib/ts/truncate.worker.ts index 52eebb7..ad00011 100644 --- a/app/src/lib/ts/truncate.worker.ts +++ b/app/src/lib/ts/truncate.worker.ts @@ -1,10 +1,9 @@ import type { TruncateRequest, TruncateResponse } from '../types/truncate-worker'; - onmessage = async (message: MessageEvent<TruncateRequest>) => { - const file = message.data.file; - const buffer = await file.arrayBuffer(); - const truncated = buffer.slice(0, message.data.size); + const file = message.data.file; + const buffer = await file.arrayBuffer(); + const truncated = buffer.slice(0, message.data.size); - postMessage({ file: truncated } as TruncateResponse); -}
\ No newline at end of file + postMessage({ file: truncated } as TruncateResponse); +}; |