Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gituser committed Apr 28, 2022
1 parent ee9d9f1 commit a76f8f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"python.pythonPath": "/home/dev01/.virtualenvs/flask-app-b5GscEs_/bin/python",
"http.proxy": "http://dev01:Soulless_Developer#2022@10.10.10.128:5187/",
"http.proxyStrictSSL": false
}
14 changes: 12 additions & 2 deletions app/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@
from app import app


@app.route('/', methods=['GET', 'POST'])
@app.route('/')
def index():
return render_template('index.html')


@app.route('/download')
def download():
return send_file(os.path.join(os.getcwd(), "app", "static", "source.zip"))


@app.route('/upcloud', methods=['GET', 'POST'])
def upload_file():
if request.method == 'POST':
f = request.files['file']
Expand All @@ -20,4 +30,4 @@ def upload_file():
@app.route('/uploads/<path:path>')
def send_report(path):
path = get_file_name(path)
return send_file(os.path.join(os.getcwd(), "public", "uploads", path))
return send_file(os.path.join(os.getcwd(), "public", "uploads", path))

0 comments on commit a76f8f7

Please sign in to comment.