-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocessing.php
More file actions
29 lines (25 loc) · 890 Bytes
/
processing.php
File metadata and controls
29 lines (25 loc) · 890 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
<?php
require_once("includes/header.php");
require_once("includes/classes/VideoUploadData.php");
require_once("includes/classes/VideoProcessor.php");
if(!isset($_POST["uploadButton"])) {
echo "No file sent to page.";
exit();
}
// 1) create file upload data
$videoUpoadData = new VideoUploadData(
$_FILES["fileInput"],
$_POST["titleInput"],
$_POST["descriptionInput"],
$_POST["privacyInput"],
$_POST["categoryInput"],
$userLoggedInObj->getUsername()
);
// 2) Process video data (upload)
$videoProcessor = new VideoProcessor($con);
$wasSuccessful = $videoProcessor->upload($videoUpoadData);
// 3) Check if upload was successful
if($wasSuccessful) {
echo "Upload successful";
}
?>