修改主页,感觉还可以
This commit is contained in:
19
templates/blog/upload.html
Normal file
19
templates/blog/upload.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<title>上传文件</title>
|
||||
上传文件
|
||||
<br>
|
||||
目前只支持jpg, jpeg, png, gif
|
||||
<form id="upload-form" enctype="multipart/form-data" method="post" action="./">
|
||||
<input type="file" name="img" required>
|
||||
<button type="submit">上传文件</button>
|
||||
</form>
|
||||
<br>
|
||||
<br>
|
||||
已上传图片
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
{% for image in images %}
|
||||
<a href="{{ url_for('static', filename='upload/img/' + image) }}">
|
||||
<img src="{{ url_for('static', filename='upload/img/' + image) }}" style="width: 10%;" alt="{{ image }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user