-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (28 loc) · 842 Bytes
/
index.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>
<title>Drag and drop file upload with php</title>
<link rel="stylesheet" href="dropzone.css">
</head>
<body>
<form action="uploadHandler.php" class="dropzone image-uploader"></form>
<script src="dropzone.js"></script>
<script type="text/javascript">
$(document).ready(function () {
Dropzone.options.myAwesomeDropzone = {
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 20, // MB
dictDefaultMessage: "Drop files here or click to upload",
parallelUploads: 1,
accept: function (file, done) {
if (file.name == "justinbieber.jpg") {
done("Naha, you don't.");
}
else {
done();
}
}
};
</script>
</body>
</html>