-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
52 lines (47 loc) · 1.22 KB
/
main.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
<html>
<head>
<title>Hello World</title>
<meta charset="UTF-8">
</head>
<body>
<h1>CSC209: Image Filter Server</h1>
<p>
If you're seeing this webpage, then you're on the right track!
</p>
<h2>Run image filter</h2>
<form id="image-form" action="/image-filter" method="get">
<div>
<label for="image">Select an image</label>
<select name="image" id="image">
</select><br />
<label for="filter">Select a filter</label>
<select name="filter">
<option value="copy">copy</option>
<option value="greyscale">greyscale</option>
<option value="gaussian_blur">gaussian_blur</option>
<option value="edge_detection">edge_detection</option>
</select>
</div>
<div>
<button type="submit">Run filter</button>
</div>
</form>
<h2>Upload a new image</h2>
<form id="image-form" action="/image-upload" method="post" enctype="multipart/form-data">
<div>
<input name="bitmap" type="file">
</div>
<div>
<button type="submit">Upload</button>
</div>
</form>
<script>
var image = document.getElementById('image');
for (var i = 0; i < filenames.length; i++) {
var option = document.createElement('option');
option.text = filenames[i];
image.add(option);
}
</script>
</body>
</html>