-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathupload.html
34 lines (34 loc) · 1014 Bytes
/
upload.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>upload-demo</title>
<link rel="stylesheet" href="css/style.css">
<script src="javascript/zepto.min.js"></script>
</head>
<body>
<h1>Substitute Interface Using "JRS" To Upload Files</h1>
<hr>
<form method="POST" action="http://127.0.0.1:8000/api/upload.do" enctype="multipart/form-data">
<p>Title: <input name="title" type="text" style="width:300px" value="A picture"></p>
<p>Picture: <input name="image" type="file" accept="image/*"></p>
<p><span class="bio">Desc: </span><textarea name="desc" cols="100" rows="5">Add a picture to demonstrate</textarea></p>
<p><input type="submit" value="Upload"></p>
</form>
<hr>
<h2>How to do this?</h2>
<p>We just add rules to ".justreq" as follow, and code some files as upload.jrs</p>
<pre>
{
...
"rules": [
{
"url": "api/upload.do",
"subs": "jrs/upload.jrs"
}
]
}
</pre>
<p class="tips">These jrs files of this example are located in ".jr/subs/jrs/"</p>
</body>
</html>