From b78f5cfad442a10a029141c049d7b3eec9624bbb Mon Sep 17 00:00:00 2001 From: Kostya Bats Date: Mon, 28 Oct 2024 16:59:40 +0300 Subject: [PATCH] Fix record name --- packages/grabber/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grabber/main.js b/packages/grabber/main.js index d7156eb..8b2dd4d 100644 --- a/packages/grabber/main.js +++ b/packages/grabber/main.js @@ -120,8 +120,8 @@ function runGrabbing(window) { client.target.addEventListener("record_upload", async ({detail: {recordId}}) => { for (const recordType of ["desktop", "webcam"]) { - const fileName = path.join(configS.recordingsDirectory ?? ".", `${recordId}_${recordType}.webm`); - fs.readFile(fileName, function (err, data) { + const fileName = `${recordId}_${recordType}.webm`; + fs.readFile(path.join(configS.recordingsDirectory ?? ".", fileName), function (err, data) { if (!err) { const fileBlob = new Blob([data], {type: 'video/webm'}) const promise = client.record_upload(fileName, fileBlob)