-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessing.php
More file actions
31 lines (25 loc) · 924 Bytes
/
Copy pathprocessing.php
File metadata and controls
31 lines (25 loc) · 924 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
28
29
30
31
<?php
require_once("includes/header.php");
require_once("includes/classes/VideoUploadData.php");
require_once("includes/classes/VideoProcessor.php");
require_once("includes/classes/User.php");
if(!isset($_POST['uploadButton'])){
echo "No file is sent!....";
exit();
}
// 1) create file upload data
$videoUploadData = new VideoUploadData($_FILES['fileInput'],
$_POST['titleInput'],
$_POST['descriptionInput'],
$_POST['categoryInput'],
$_POST['privacyInput'],
$userLoggedInObj->getUsername()
);
// 2) process data
$videoProcess = new VideoProcessor($con);
$wasSuccessful = $videoProcess->upload($videoUploadData);
if($wasSuccessful)
{
echo "\nupload Successful\n";
}
?>