Working single file upload
This commit is contained in:
1 parent
d406574707
commit
d332aca22e
7 files changed
+75
-21
No files matched your search
@@ -1,8 +1,17 @@
|
||||
from flask import Flask
|
||||
from blueprints.home.home import home_bp
|
||||
from blueprints.upload_photo.upload_photo import upload_photo_bp
|
||||
import os
|
||||
import json
|
||||
|
||||
with open("config.json", 'r') as config_file:
|
||||
config_json = json.loads(config_file.read())
|
||||
|
||||
if not os.path.exists(config_json["upload_location"]):
|
||||
os.makedirs(config_json["upload_location"])
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config["config"] = config_json
|
||||
app.register_blueprint(home_bp)
|
||||
app.register_blueprint(upload_photo_bp)
|
||||
|
||||
|
||||
Reference in new issue
Block a user