update form
SSH Build / Deploy (push) Successful in 5s Details

This commit is contained in:
Carneiro 2024-08-06 11:37:35 -03:00
parent 11ee69f584
commit 6dac47a11a
1 changed files with 7 additions and 2 deletions

View File

@ -73,6 +73,11 @@
return 1; return 1;
} }
function push_to_git() {
$git_cmd = '-c user.name="www-data" -c user.email="no-replay@example.org"'
shell_exec('cd /var/www/src/AliceClass;' . $git_cmd . 'add _data/aulas.json;' . $git_cmd . 'commit -m "update data";' . $git_cmd . 'push');
}
$username = $_SERVER['PHP_AUTH_USER']; $username = $_SERVER['PHP_AUTH_USER'];
$video_title = $_POST["videoTitle"]; $video_title = $_POST["videoTitle"];
@ -86,8 +91,8 @@
$brute_file = $target_dir . "/src/" . $video_title . '.mkv'; $brute_file = $target_dir . "/src/" . $video_title . '.mkv';
$target_file = $target_dir . "/dest/" . $video_title . '.mp4'; $target_file = $target_dir . "/dest/" . $video_title . '.mp4';
// create_user_dir($target_dir) || echo error && exit; create_user_dir($target_dir); //|| echo error && exit;
// check_file_extension($_FILES["fileToUpload"]["tmp_name"]) || echo error && exit; check_file_extension($_FILES["fileToUpload"]["tmp_name"]); // || echo error && exit;
// !check_file_exists($brute_file) || echo error && exit; // !check_file_exists($brute_file) || echo error && exit;
upload($orig_file, $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; process_file($username, $video_title, $brute_file, $target_file); // || echo error && exit;