forked from nabilfarhann/Vidhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessing.php
More file actions
27 lines (22 loc) · 898 Bytes
/
Copy pathprocessing.php
File metadata and controls
27 lines (22 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
require_once("includes/header.php");
require_once("includes/footer.php");
require_once("includes/classes/VideoUploadData.php");
require_once("includes/classes/VideoProcessor.php");
if(!isset($_POST["uploadButton"])){
echo "No file sent to the page";
exit();
}
//1) create file upload data
$videoUploadData = new VideoUploadData($_POST["video_url"], $_POST["video_thumbnail"], $_POST["cloud_id"], $_POST["duration"], $_POST["titleInput"], $_POST["descriptionInput"], $_POST["privacyInput"], $_POST["categoryInput"], $userLoggedInObj->getUsername());
//2) process video data (upload)
$videoProcessor = new VideoProcessor($con);
$wasSuccessful = $videoProcessor->upload($videoUploadData);
//3) check if upload was successful
if($wasSuccessful){
//echo "Upload successful";
echo "<div class='container' style='margin-top: 10px;'>
Video has been successfully uploaded.
</div>";
}
?>