TT#127805 remove temp transcoded files

* temp files created for transcoding operations
  are now correctly removed

Change-Id: Ie95fccd2ed2a533060e4abc2fa3593c9f951225a
mr10.0
Kirill Solomko 4 years ago
parent ac30d51f37
commit d3566d0aa8

@ -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