Commit 0145c7e1c41eaac26b960f8e28fa60df769b4e44
1 parent
38c27242
Exists in
master
and in
1 other branch
Diminui escopo de variável
Showing
1 changed file
with
3 additions
and
5 deletions
Show diff stats
endpoints/video.js
... | ... | @@ -26,8 +26,6 @@ function init(req, res) { |
26 | 26 | return; |
27 | 27 | } |
28 | 28 | |
29 | - var video; | |
30 | - | |
31 | 29 | /* Checa se o arquivo de vídeo submetivo possui uma extensão válida */ |
32 | 30 | if (req.files.video !== undefined) { |
33 | 31 | if (parameters.checkVideo(req.files.video.name) === false) { |
... | ... | @@ -35,7 +33,7 @@ function init(req, res) { |
35 | 33 | return; |
36 | 34 | } |
37 | 35 | |
38 | - video = { | |
36 | + var video = { | |
39 | 37 | 'name': req.files.video.name, |
40 | 38 | 'path': req.files.video.path |
41 | 39 | } |
... | ... | @@ -48,7 +46,7 @@ function init(req, res) { |
48 | 46 | |
49 | 47 | response.pipe(fs.createWriteStream(id)); |
50 | 48 | |
51 | - video = { | |
49 | + var video = { | |
52 | 50 | 'name': req.body.video_url.substring(req.body.video_url.lastIndexOf('/') + 1), |
53 | 51 | 'path': id |
54 | 52 | } |
... | ... | @@ -84,7 +82,7 @@ function processVideo(id, video, req, res) { |
84 | 82 | /* Cria a linha de comando */ |
85 | 83 | var command_line = 'vlibras_user/vlibras-core/./vlibras ' + parameters.getServiceType(req.body.servico) + ' uploads/' + id + '/' + |
86 | 84 | video.name + ' 1 ' + parameters.getPosition(req.body.posicao) + ' ' + parameters.getSize(req.body.tamanho) + ' ' + |
87 | - parameters.getTransparency(req.body.transparencia) + ' ' + id + '> /tmp/core_log 2>&1'; | |
85 | + parameters.getTransparency(req.body.transparencia) + ' ' + id + ' > /tmp/core_log 2>&1'; | |
88 | 86 | |
89 | 87 | console.log(command_line); |
90 | 88 | ... | ... |