Skip to content

Instantly share code, notes, and snippets.

@wolfiex
Created November 13, 2020 00:00
Show Gist options
  • Save wolfiex/14f93c282437614fc30db4c8eeb7ae4d to your computer and use it in GitHub Desktop.
Save wolfiex/14f93c282437614fc30db4c8eeb7ae4d to your computer and use it in GitHub Desktop.
Upload_flask_empty.py
import sys,os,re
from flask import Flask, flash, request, redirect, render_template
from werkzeug.utils import secure_filename
from config import *
app=Flask(__name__)
app.secret_key = app_key
## on page '/upload' load display the upload file
@app.route('/upload')
def upload_form():
return render_template('upload.html')
#############################
# Additional Code Goes Here #
#############################
if __name__ == "__main__":
print('to upload files navigate to http://127.0.0.1:4000/upload')
app.run(host='127.0.0.1',port=4000,debug=True,threaded=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment