forked from anthony-mills/s3-video
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload-video.php
59 lines (51 loc) · 1.32 KB
/
upload-video.php
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<script type="text/javascript">
jQuery(function() {
jQuery("#videoUpload").validate({
errorLabelContainer: jQuery("#validationError"),
messages: {
upload_video: {
required: 'You need to select a video to upload<br>'
}
}
});
jQuery(':input[placeholder]').placeholder();
});
</script>
<div class="wrap">
<h2>Upload Video</h2>
<?php
if (!$tmpDirectory) {
?>
<p>The wp-content/uploads directory does not appear to be writable, please change the permissions and try again.</p>
<?php
} else {
?> <p>Upload an .flv or mp4 file with the form below to your S3 bucket.</p>
<form method="POST" id="videoUpload" enctype="multipart/form-data">
<?php if (!empty($errorMsg)) { ?>
<div id="validationError">
<?php echo $errorMsg; ?>
</div>
<?php } else { ?>
<div id="validationError"></div>
<?php } ?>
<?php if (!empty($successMsg)) { ?>
<div id="successMsg">
<?php echo $successMsg; ?>
</div>
<?php } ?>
<table>
<tr>
<th scope="row">Video File</th>
<td>
<label for="upload_image">
<input type="file" id="upload_video" name="upload_video" class="required" />
<input type="submit" value="Upload Video">
</label>
</td>
</tr>
</table>
</form>
<?php
}
?>
</div>