You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.0 KiB

<html>
<head>
<meta charset="utf-8" />
<title>Storage</title>
<link rel="stylesheet" href="static/css/styles.css" />
<link rel="icon" href="/static/images/favicon.png">
</head>
<script type="text/javascript">
function getFile(){
document.getElementById("upfile").click();
}
function sub(obj){
var file = obj.value;
var fileName = file.split("\\");
document.getElementById("selectBtn").innerHTML = fileName[fileName.length-1];
document.myForm.submit();
event.preventDefault();
}
</script>
<body>
<form action="" method=post enctype=multipart/form-data name=myForm>
<div class="block">
<div id="selectBtn" onclick="getFile()">Select file</div>
<div style='height: 0px; width: 0px;overflow:hidden;'>
<input id="upfile" type="file" name="file" value="upload" onchange="sub(this)"/>
</div>
</div>
</form>
</body>
</html>