Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from flask import Flask, request, send_from_directory
|
2 |
import os
|
3 |
|
4 |
app = Flask(__name__)
|
@@ -9,7 +9,13 @@ if not os.path.exists(UPLOAD_FOLDER):
|
|
9 |
|
10 |
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
11 |
|
|
|
12 |
@app.route('/', methods=['GET', 'POST'])
|
|
|
|
|
|
|
|
|
|
|
13 |
def upload_file():
|
14 |
if request.method == 'POST':
|
15 |
if 'file' not in request.files:
|
|
|
1 |
+
from flask import Flask, request, send_from_directory,abort
|
2 |
import os
|
3 |
|
4 |
app = Flask(__name__)
|
|
|
9 |
|
10 |
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
11 |
|
12 |
+
|
13 |
@app.route('/', methods=['GET', 'POST'])
|
14 |
+
def home():
|
15 |
+
abort(500, "Server Error")
|
16 |
+
|
17 |
+
|
18 |
+
@app.route('/upload', methods=['GET', 'POST'])
|
19 |
def upload_file():
|
20 |
if request.method == 'POST':
|
21 |
if 'file' not in request.files:
|