Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
<head>
<title>Upload Image - SkinSense</title>
<link rel="stylesheet" href="css/style.css">
<style>
#preview {
width: 300px;
height: auto;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>Upload Skin Image</h2>
<form enctype="multipart/form-data">
<input type="file" class="form-control mb-3" accept="image/*">
<input type="file" class="form-control mb-3" accept="image/*" onchange="loadFile(event)"><br>
<img id="preview" alt="Skin-Preview"/><br>

<label>Select Symptoms:</label><br>
<input type="checkbox" value="itchy"> Itchy
Expand All @@ -18,6 +26,19 @@ <h2>Upload Skin Image</h2>
<button class="btn btn-warning">Submit</button>
</form>
</div>
<script>
function loadFile(event) {
var input=event.target;
var image=document.getElementById('preview');
if(input.files && input.files[0]) {
var reader=new FileReader();
reader.onload=function(e) {
image.src=e.target.result;
}
reader.readAsDataURL(input.files[0]);
}
}
</script>
</body>
</html>