Skip to content

Commit af9c8df

Browse files
committed
updates
1 parent f4fc3f8 commit af9c8df

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

components/rendi/actions/run-ffmpeg-command/run-ffmpeg-command.mjs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export default {
6868
let response = await this.rendi.runFfmpegCommand({
6969
$,
7070
data: {
71-
input_files: this.inputFiles,
72-
output_files: this.outputFiles,
71+
input_files: inputFiles,
72+
output_files: outputFiles,
7373
ffmpeg_command: this.command,
7474
max_command_run_seconds: this.maxCommandRunSeconds,
7575
},
@@ -93,17 +93,19 @@ export default {
9393
responseType: "arraybuffer",
9494
});
9595
const filename = value.storage_url.split("/").pop();
96-
const rawcontent = resp.toString("base64");
97-
const buffer = Buffer.from(rawcontent, "base64");
9896
const downloadedFilepath = `/tmp/${filename}`;
99-
fs.writeFileSync(downloadedFilepath, buffer);
97+
fs.writeFileSync(downloadedFilepath, resp);
10098

10199
response.tmpFiles.push({
102100
filename,
103101
downloadedFilepath,
104102
});
105103
}
106104
}
105+
106+
if (response?.error_message) {
107+
throw new ConfigurationError(response.error_message);
108+
}
107109
}
108110

109111
$.export("$summary", `FFmpeg command ${this.waitForCompletion

0 commit comments

Comments
 (0)