Skip to content

Commit 0cdee14

Browse files
authored
Merge pull request #52 from LetMeFly666/flask
记录一个在手机上远程连接电脑写出来的代码
2 parents bf25da3 + 239c00b commit 0cdee14

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

png.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'''
2+
Author: LetMeFly
3+
Date: 2023-10-20 10:00:08
4+
LastEditors: LetMeFly
5+
LastEditTime: 2023-10-20 10:20:27
6+
'''
7+
from flask import send_file, send_from_directory
8+
import flask
9+
10+
app = flask.Flask('1')
11+
12+
@app.route("/a/")
13+
def download_file():
14+
return send_file(r"C:\Users\LetMeFly\Desktop\image.png", 'a.png', as_attachment=True)
15+
16+
print(app.url_map)
17+
app.run(host='0.0.0.0', port='80', debug=True)

0 commit comments

Comments
 (0)