diff --git a/main.py b/main.py index 3fa952f..21e8569 100644 --- a/main.py +++ b/main.py @@ -10,31 +10,21 @@ app = Flask(__name__) app.config['UPLOAD_FOLDER'] = "./dataset/" app.config['MAX_CONTENT_LENGTH'] = 10000000000 # 10GB -meinheld.set_max_content_length(100*1024*1024) # Return our beautiful Bootstrap webpage. That we totally have. @app.route('/') def upload(): - return render_template('upload.html') - -# What happens when the files just don't fit -@app.errorhandler(413) -def request_entity_too_large(error): - return 'File Too Thicc', 413 - -# What happens when we did an oopsie -@app.errorhandler(500) -def internal_server_error(error): - return render_template('error.html') + return render_template('index.html') # What happens when someone uploads a thingy -@app.route('/uploader', methods=['POST']) +@app.route('/upload', methods=['POST']) def upload_file(): if request.method == 'POST': f = request.files['file'] - + + # Return success webpage return render_template('successful.html') else: diff --git a/templates/base.html b/templates/base.html index 6df3f10..9506a0e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,43 +14,21 @@ - + - - - + + +
- -