diff --git a/php/upload.php b/php/upload.php
index bf8d5c9..81601f6 100755
--- a/php/upload.php
+++ b/php/upload.php
@@ -32,6 +32,7 @@
// Move uploaded file to correct dir
function upload($orig_file, $brute_file) {
+
if (!move_uploaded_file($orig_file, $brute_file)) {
echo "Houve um problema com o upload do arquivo.";
return 0;
@@ -42,6 +43,8 @@
// Processa o vĂdeo com o script do flavio
function process_file($username, $title, $input_file, $output_file) {
+ $SCRIPT_PATH = '/var/www/src/AliceClass/script/script.sh';
+
$cmd = sprintf('%s "%s" "%s" "%s" "%s" "%s"',
$SCRIPT_PATH, $title, $username, $input_file, '', $output_file);
@@ -83,11 +86,11 @@
$brute_file = $target_dir . "/src/" . $video_title . '.mkv';
$target_file = $target_dir . "/dest/" . $video_title . '.mp4';
- create_user_dir($target_dir) || exit;
- check_file_extension($_FILES["fileToUpload"]["tmp_name"]) || exit;
- !check_file_exists($brute_file) || exit;
- upload($brute_file) || exit;
- process_file($username, $video_title, $brute_file, $target_file) || exit;
+ // create_user_dir($target_dir) || echo error && exit;
+ // check_file_extension($_FILES["fileToUpload"]["tmp_name"]) || echo error && exit;
+ // !check_file_exists($brute_file) || echo error && exit;
+ upload($orig_file, $brute_file); //|| echo error && exit;
+ process_file($username, $video_title, $brute_file, $target_file); // || echo error && exit;
insert_into_db($username, $video_title, $video_desc, $video_level, $video_software, $video_date);
echo "The file ". htmlspecialchars(basename($orig_file)). " has been uploaded.";