mirror of
https://github.com/alvierahman90/uploadr.git
synced 2025-10-14 00:14:27 +00:00
Working.
This commit is contained in:
7
templates/hello.html
Normal file
7
templates/hello.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<!doctype html>
|
||||
<title>Hello from Flask</title>
|
||||
{% if name %}
|
||||
<h1>Hello {{ name }}!</h1>
|
||||
{% else %}
|
||||
<h1>Hello, World!</h1>
|
||||
{% endif %}
|
18
templates/upload.html
Normal file
18
templates/upload.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<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 = "http://{{ ip }}:{{ port }}/upload" method = "POST"
|
||||
enctype = "multipart/form-data">
|
||||
<div class="fileUpload btn">
|
||||
<span>Upload</span>
|
||||
<input class="upload btn" type = "file" name = "file" />
|
||||
</div>
|
||||
<input class="btn" type = "submit"/>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
17
templates/upload_success.html
Normal file
17
templates/upload_success.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Upload success!</h1>
|
||||
<div class="indent">
|
||||
<p>File located at <a id="file_link" href=""><a>
|
||||
<script>
|
||||
|
||||
file = document.getElementById('file_link');
|
||||
file.setAttribute('href','http://{{ ip }}:{{ port }}/download/{{ filename }}');
|
||||
file.innerHTML = 'http://{{ ip }}:{{ port }}/download/{{ filename }}';
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
Reference in New Issue
Block a user