-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
64 lines (57 loc) · 1.73 KB
/
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
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
60
61
62
63
64
<html>
<head>
<title>Measure It</title>
<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container">
<a class="navbar-brand" href="/">Measure It</a>
<ul class="nav navbar-nav">
<li class="active">
<a href="/">Home</a>
</li>
</ul>
</div>
</nav>
<div class="col-lg-12">
<div class="jumbotron" style="padding:40px;">
<h1>Measure It</h1>
<p>....</p>
</div>
</div>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-6">
<form id="uploadForm" enctype="multipart/form-data" action="/api/photo" method="post">
<input type="file" name="photo" multiple />
<input type="submit" value="Upload Image" name="submit">
<input type='text' id='random' name='random'><br>
<span id="status"></span>
</form>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.min.js"></script>
<script>
<!-- TO-DO : inline script move app.js-->
$(document).ready(function() {
$('#uploadForm').submit(function() {
$("#status").empty().text("File is uploading...");
$(this).ajaxSubmit({
error: function(xhr) {
status('Error: ' + xhr.status);
},
success: function(response) {
console.log(response)
$("#status").empty().text(response);
}
});
return false;
});
});
</script>
</body>
</html>