fupie/ws/html/templates/index.html

56 lines
1.1 KiB
HTML
Raw Normal View History

2022-09-02 15:42:48 +01:00
<!DOCTYPE html>
<html>
<head>
<title>File Upload</title>
<link rel="icon" type="image/gif" href="https://jigglypuff.zone/pufftaunt.gif">
<style>
body {
background-color: black;
color: rebeccapurple;
}
h1 {
text-align: center;
}
#main-upload {
/* margin: auto; */
margin-left: auto;
margin-right: auto;
margin-top: 10%;
margin-bottom: 30%;
width: 30%;
border: 5px solid rebeccapurple;
height: 30vw;
padding: 10px;
background-color: rgba(13, 6, 19, 0.4);
font-size: large;
font-weight: bold;
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<h1>file upload</h1>
<div id="main-upload">
<!-- <div id="upload-box"> -->
<form id="upload-form" method="post" action="/v1/upload" enctype="multipart/form-data">
<label for="upload">Upload a file</label>
<input type="file" id="upload" name="upload" accept="*" value="upload">
</form>
<!-- </div> -->
</div>
<script>
window.addEventListener('paste', e => {
document.getElementById("upload").files = e.clipboardData.files;
document.getElementById("upload-form").submit();
});
</script>
</body>
</html>