-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiles.html
More file actions
122 lines (104 loc) · 2.89 KB
/
files.html
File metadata and controls
122 lines (104 loc) · 2.89 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>etamodder file uploadz</title>
<link rel="stylesheet" href="https://unpkg.com/xp.css">
<script src="https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js"></script>
<style>
body {
background-image: url('./img/bliss-winxp.jpg');
background-size: cover;
background-position: center;
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: "Tahoma", sans-serif;
}
.window {
width: 600px;
display: flex;
flex-direction: column;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}
.window-body {
flex: 1;
padding: 10px;
display: flex;
flex-direction: column;
gap: 10px;
background: #ece9d8;
}
.fun-box {
border: 2px groove #ccc;
background: white;
padding: 10px;
flex: 1;
overflow: auto;
}
.xp-button {
background: #e0e0e0;
border: 1px solid #808080;
padding: 3px 10px;
cursor: pointer;
font-weight: bold;
}
.xp-button:active {
background: #c0c0c0;
border-top: 1px solid #404040;
border-left: 1px solid #404040;
}
.status-bar p {
margin: 0;
padding: 2px 5px;
font-size: 12px;
}
a {
color: #0000ff;
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="window">
<div class="title-bar">
<div class="title-bar-text">fileupload.exe</div>
<div class="title-bar-controls">
<button aria-label="Minimize"></button>
<button aria-label="Maximize"></button>
<button aria-label="Close" onclick="window.location.href='index.html'"></button>
</div>
</div>
<div class="window-body">
<div class="fun-box">
<p>select a file to upload:</p>
<input type="hidden" role="uploadcare-uploader" data-public-key="demopublickey" data-clearable="true">
<div class="output" id="file-url" style="margin-top: 1rem;"></div>
</div>
<div>
<button class="xp-button" id="btnClear">clear output</button>
</div>
</div>
<div class="status-bar">
<p class="status-bar-field">status: ready for things</p>
<p class="status-bar-field">xp mode (possibly) enabled</p>
</div>
</div>
<script>
const widget = uploadcare.Widget('[role=uploadcare-uploader]');
const fileUrl = document.getElementById('file-url');
const btnClear = document.getElementById('btnClear');
widget.onUploadComplete(info => {
const url = info.cdnUrl;
fileUrl.innerHTML =
`<p>file successfully uploaded. <a href="${url}" target="_blank" rel="noopener noreferrer">${url}</a></p>`;
});
btnClear.onclick = () => { fileUrl.innerHTML = ''; }
</script>
</body>
</html>