-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload.html
77 lines (75 loc) · 3.59 KB
/
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
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
72
73
74
75
76
77
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
<title>My DApp</title>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<script src="swarm.min.js"></script>
<script src="js/upload.js"></script>
<link rel="stylesheet" href="css/upload.css" type="text/css">
</head>
<body>
<div id="alertbox"></div>
<div id="logo-container">
<a id="name-logo" href="index.html">Gifhive</a>
</div>
<div class="alert alert-danger"><b>Note:</b> You can only upload one of four pre-picked images, due to a bug in Status regarding file uploads!</div>
<div id="upload-container">
<input type="button" id="imgupload" class="btn btn-danger" data-toggle="modal" data-target="#myModal" value="Pick a gif!">
<img src="" height="200" alt="Image preview..." id="imgpreview">
<div id="info-fields">
<input type="text" class="form-control" placeholder="Caption" id="imgcaption-input">
</div>
<div id="uploadbtn-container">
<button id="uploadbtn" class="btn" onclick="uploadFile()">Upload!</button>
</div>
</div>
<!-- File picker modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Choose a file</h4>
</div>
<div class="modal-body">
<p>Please choose one of the images.</p>
<div class="row">
<div class="
choosebox">
<img id="file1" src="#" alt="File 1" width="200px">
<input type="button" id="file1-choose" value="Choose!" class="btn" onclick="choose1();">
</div>
<div class="
choosebox">
<img id="file2" src="#" alt="File 2" width="200px">
<input type="button" id="file2-choose" value="Choose!" class="btn" onclick="choose2();">
</div>
<div class="
choosebox">
<img id="file3" src="#" alt="File 3" width="200px">
<input type="button" id="file3-choose" value="Choose!" class="btn" onclick="choose3();">
</div>
<div class="
choosebox">
<img id="file4" src="#" alt="File 4" width="200px">
<input type="button" id="file4-choose" value="Choose!" class="btn" onclick="choose4();">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
</body>
</html>