|
|
|
@ -22,7 +22,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
|
|
|
} else {
|
|
|
|
|
do {
|
|
|
|
|
$generatedFileName = generateRandomString();
|
|
|
|
|
} while (file_exists("videos/" . $generatedFileName . "." . $extension));
|
|
|
|
|
} while (file_exists("./videos/" . $generatedFileName . "." . $extension));
|
|
|
|
|
|
|
|
|
|
move_uploaded_file(
|
|
|
|
|
$_FILES["videoFile"]["tmp_name"],
|
|
|
|
@ -32,7 +32,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
|
|
|
$xml = $_POST["xmlFile"];
|
|
|
|
|
$xml = str_replace("<video>", '<video src="' . $generatedFileName . '.' . $extension . '">', $xml);
|
|
|
|
|
|
|
|
|
|
writeToFile("videos/" . $generatedFileName . ".xml", $xml);
|
|
|
|
|
writeToFile("./videos/" . $generatedFileName . ".xml", $xml);
|
|
|
|
|
redirect("?v=" . $generatedFileName);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|