-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload.php
More file actions
52 lines (49 loc) · 1.36 KB
/
upload.php
File metadata and controls
52 lines (49 loc) · 1.36 KB
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
<?php
// include_once('../api/auth.php');
?>
<!doctype html>
<html>
<head>
<?php require("meta_com.php"); ?>
<link href="http://hayageek.github.io/jQuery-Upload-File/uploadfile.min.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/index.css">
<title>NUCourse</title>
</head>
<body>
<div class="totalWrapper">
<?php require("header.php"); ?>
<div class="container">
<div id="fileuploader">Upload</div>
</div>
<?php require("footer.php"); ?>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://hayageek.github.io/jQuery-Upload-File/jquery.uploadfile.min.js"></script>
<script>
$(document).ready(function()
{
$("#fileuploader").uploadFile({
url:"api/videoUpload.php",
dragDrop: true,
fileName:"myfile",
allowedTypes:"jpg,png,gif,doc,pdf,zip",
returnType:"json",
showDelete:true,
deleteCallback: function(data,pd)
{
for(var i=0;i<data.length;i++)
{
$.post("api/videoDelete.php",{op:"delete",name:data[i]},
function(resp, textStatus, jqXHR)
{
//Show Message
$("#status").append("<div>File Deleted</div>");
});
}
pd.statusbar.hide(); //You choice to hide/not.
}
});
});
</script>
</body>
</html>