forked from smokinjoe/jQuery-drag-drop-file-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
32 lines (31 loc) · 1.01 KB
/
demo.html
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
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Drag+drop uploads for any file input | Arron Bailiss</title>
<link type="text/css" rel="stylesheet" href="jquery.drag.drop.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="jquery.drag.drop.js"></script>
<script type="text/javascript">
var afterUploaded = function(resp) {
alert(resp);
};
$(document).ready(function() {
$('input[type="file"]').dropUpload({
'uploadUrl' : '/upload',
'uploaded' : afterUploaded,
'dropClass' : 'file-drop',
'dropHoverClass': 'file-drop-hover',
'defaultText' : 'Drop your files here!',
'hoverText' : 'Let go to upload!'
});
});
</script>
</head>
<body>
<form action="#" method="post" enctype="multipart/form-data">
<input type="file" name="files[]" multiple="multiple">
<input type="submit" value="Upload!">
</form>
</body>
</html>