forked from Neoteroi/BlackSheep-Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-2.html
71 lines (62 loc) · 2.65 KB
/
example-2.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
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 20px;
font-family: sans-serif;
}
section {
border-bottom: 1px dotted gray;
padding-bottom: 20px;
}
li {
padding: 3px 0;
}
</style>
</head>
<body>
<h1>Proxy example</h1>
<ol>
<li>Start the first BlackSheep application (localhost:44777).</li>
<li>Start the proxy BlackSheep application (localhost:44555).</li>
<li>Try using this page.</li>
<li>Try uploading files.</li>
<li>Check the response, and the `out` folder.</li>
</ol>
<section>
<h2>Static files</h2>
<p>The following image is served by the first BlackSheep app.</p>
<img src="http://localhost:44777/Octocat.jpg" width="100" alt="Octocat served by the second BlackSheep app" />
<br />
<p>The following image is served by the BlackSheep proxy app.</p>
<img src="http://localhost:44555/Octocat.jpg" width="100" alt="Octocat served by the first BlackSheep app" />
</section>
<section>
<h2>Test the upload to the first BlackSheep app directly:</h2>
<p>The response should display JSON information about the request, and uploaded files should be written to the
"out" folder.</p>
<form action="http://localhost:44777/upload" method="post" enctype="multipart/form-data">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname" required><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname" required><br><br>
<label for="files">Select some files:</label>
<input id="files" type="file" name="files" multiple required/>
<input type="submit" value="Submit">
</form>
<h2>Test the upload to the BlackSheep proxy (which proxies to the first BlackSheep app):</h2>
<p>The response should display JSON information about the request, and uploaded files should be written to the
"out" folder.</p>
<form action="http://localhost:44555/upload" method="post" enctype="multipart/form-data">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname" required><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname" required><br><br>
<label for="files">Select some files:</label>
<input id="files" type="file" name="files" multiple required/>
<input type="submit" value="Submit">
</form>
</section>
</body>
</html>