forked from AyeshaNagdawala/HealthBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uploadreport.html
109 lines (76 loc) · 2.89 KB
/
uploadreport.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PDF Document Reader</title>
<link rel="stylesheet" type="text/css" href="{{url_for('static',filename='static/bootstrap.min.css')}}">
<link rel="stylesheet" type="text/css" href="static/main.css">
<link rel="stylesheet" type="text/css" href="static/uploadreport.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&display=swap" rel="stylesheet">
</head>
<body>
<nav>
<div class="container flex main-nav">
<a href="#" class="company-logo img"><img src="static/logo final.png" alt="company-logo"></a>
<div class="nav-links">
<ul class="flex">
<li><a href="/aboutus"class="hover-link">About Us</a></li>
<li><a href="/faq"class="hover-link secondary-button">FAQs</a></li>
<li><a href="/patientdashboard"class="hover-link primary-button">Dashboard</a></li>
</ul>
</div>
</div>
</nav>
<section class="wrapper">
<h2 class="h2 mt-0 text-center jumbo" >Upload Report</h2>
<div class="container-fluid mt-5">
<div class="row m-0">
<div class="col-sm-6 col-md-6">
<form method="post" enctype="multipart/form-data">
<!--<label class="file">-->
<p><input type="file" id="imgInp" name="file"></p>
<!-- <input type="file" id="imgInp" name="file_source" aria-label="File browser example">-->
<!--<span class="file-custom"></span>-->
<!--</label>-->
<!-- <input type="file" id="imgInp" class="input-btn" name="file_source" size="40">-->
<img src="{{ user_image }}" id="img-upload" alt="" class="img-upload"/>
<p><input type=submit value=Upload style="color:white !important"></p>
</form>
</div>
</div>
</div>
<!--<div class="container-fluid">
<div class="row m-0">
<div class="col-sm-6 col-md-6">
<button class="btn btn-primary upload-btn mt-4" type="submit" id="process" onclick="myFunction()">Upload</button>
</div>
<div class="col-sm-6 col-md-6">
<button class="btn btn-primary gray-btn float-right" onclick="javascript:window.close()">Exit</button>
</div>-->
</section>
<script src="static/js/jquery-2.2.4.min.js" type="text/javascript"></script>
<script src="static/js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/javascript">
$('input[type=file]').change(function () {
console.log("file changed event");
var filePath = $(this).val();
console.log("filepath---->"+filePath);
//alert($('input[type=file]').val());
});
$(document).ready( function() {
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#img-upload').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#imgInp").change(function(){
readURL(this);
});
});
</script>
</body>
</html>