mirror of
https://github.com/alvierahman90/uploadr.git
synced 2025-01-12 02:04:20 +00:00
26 lines
718 B
HTML
26 lines
718 B
HTML
<html>
|
|
<head>
|
|
<link rel="stylesheet" type="text/css" href="/css/style.css">
|
|
<link rel="stylesheet" type="text/css" href="/css/bootstrap.css">
|
|
</head>
|
|
<body>
|
|
|
|
<form action = "/upload" method = "POST"
|
|
enctype = "multipart/form-data">
|
|
<div class="fileUpload btn">
|
|
<span>Upload</span>
|
|
<input id="uploadBtn" class="upload btn" type="file" name="file" />
|
|
</div>
|
|
<p id="uploadFile"></p>
|
|
<input class="btn" type = "submit"/>
|
|
</form>
|
|
<script>
|
|
document.getElementById("uploadBtn").onchange = function () {
|
|
filename = document.getElementById('uploadBtn').value.split('C:\\fakepath\\')[1];
|
|
document.getElementById("uploadFile").innerHTML= filename;
|
|
};
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|