forked from bvdelft/spin-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload.html
32 lines (32 loc) · 1013 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
<html>
<head>
<script>
function uploading() {
document.getElementById('uploading').style.display = 'block';
document.getElementById('theform').style.display = 'none';
}
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
</script>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="post" id="theform">
<input name="promela-file" type="file" />
<input id="token" name="token" type="hidden" />
<input value="upload" name="action" type="hidden" />
<input type="submit" onclick="uploading()" value="Upload" />
</form>
<div id="uploading" style="display: none">
Uploading file...
</div>
<script>
var token = getUrlVars()['token'];
document.getElementById('token').value = token;
</script>
</body>
</html>