mirror of
https://github.com/wassname/flask-cloudy.git
synced 2026-09-11 12:11:01 +08:00
Flask-Cloudy 0.10.0
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>Flask-Cloudy</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Flask-Cloudy</h1>
|
||||
|
||||
|
||||
<form action="{{ url_for('upload') }}" method="post" enctype="multipart/form-data">
|
||||
Select image to upload:
|
||||
<input type="file" name="file" id="fileToUpload"> <br>
|
||||
<input type="submit" value="Upload File" name="submit">
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>List of files available on the storage:</h3>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in storage %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('view', object_name=obj.name) }}">{{ obj.name }}</a></td>
|
||||
<td>{{ obj.size }} bytes</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title>Flask-Cloudy</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Flask-Cloudy: View File</h1>
|
||||
<a href="{{ url_for('index') }}"><- Home</a>
|
||||
<br> <br>
|
||||
|
||||
Name: {{ obj.name }} <br><br>
|
||||
Size: {{ obj.size }} bytes <br><br>
|
||||
|
||||
Short url: {{ obj.short_url }} <br><br>
|
||||
|
||||
View file: <a href="{{ obj.url }}">{{ obj.url }}</a> <br><br>
|
||||
|
||||
{% set download_url = obj.download_url() %}
|
||||
Download: <a href="{{ download_url }}">{{ download_url }}</a> <br><br>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user