This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
75 lines (62 loc) · 2.17 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
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="/dist/main.js"></script>
<style>
#main-heading {
margin-top: 2rem;
margin-bottom: 2rem;
}
#result-message-container span {
margin: 0.3rem;
padding: 0.3rem;
font-weight: bold;
}
#result-message-container span.pending {
color: white;
background-color: grey;
}
#result-message-container span.succeeded {
color: white;
background-color: green;
}
#result-message-container span.failed {
color: white;
background-color: green;
}
#result-message-container {
display: none;
}
#result-message-container.show {
display: block;
}
</style>
</head>
<body>
<div class="container">
<h2 id="main-heading">B2 Image Browser Upload Example</h2>
<div>
<p>Choose a file to upload and click "Upload".</p>
<p>Observe in the network tab as the following steps are performed:</p>
<ol>
<li>The upload details are fetched from the running back end.</li>
<li>The preflight (OPTIONS) request for the B2 file upload is performed.</li>
<li>The POST request for the B2 file upload is performed to the upload URL returned from the running
back end.</li>
</ol>
</div>
<div class="form-group">
<input type="file" class="" id="uploadFileInput" /><br />
<button class="btn-default" id="uploadFileButton">Upload</button>
</div>
<div class="results">
<p>Upload file result:</p>
<div id="result-message-container">Upload succeeded (2xx response from b2_upload_file API)</div>
</div>
</body>
</html>