TT#127805 remove temp transcoded files

* temp files created for transcoding operations
  are now correctly removed

Change-Id: Ie95fccd2ed2a533060e4abc2fa3593c9f951225a
(cherry picked from commit d3566d0aa8)
mr9.5.1
Kirill Solomko 5 years ago
parent 6e253509bd
commit 6df13ee59e

@ -24,7 +24,9 @@ sub transcode_data {
$resource->{data} = NGCP::Panel::Utils::Sounds::transcode_file(
$filename, uc($from_codec), $resource->{codec},
);
unlink($filename);
} catch($e) {
unlink($filename);
$c->log->error("failed to transcode file: $e");
$self->error($c, HTTP_UNPROCESSABLE_ENTITY, "Failed to transcode file");
return;

Loading…
Cancel
Save