diff --git a/file.py b/file.py index d144d57..4dcd617 100644 --- a/file.py +++ b/file.py @@ -5,12 +5,12 @@ from PIL import Image app_conf = app_conf.conf() def init(): - try: - os.makedirs(app_conf.get("file", "inputdir")) - os.makedirs(app_conf.get("file", "storedir")) - os.makedirs(app_conf.get("file", "tmpdir")) - except: - pass + paths = ("inputdir","storedir","tmpdir") + for path in paths: + try: + os.makedirs(app_conf.get("file", path)) + except Exception as e: + print(e) def auotLoadFile(): diff --git a/main.py b/main.py index 2e2cde3..2c6fed3 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,7 @@ from flask import * from web.api_Img import api_Img_bp from web.page import page_bp +from web.admin_page import admin_page_bp app = Flask(__name__) @@ -18,6 +19,7 @@ def appinit(): app.register_blueprint(api_Img_bp) app.register_blueprint(page_bp) +app.register_blueprint(admin_page_bp) if __name__ == "__main__": appinit() diff --git a/templates/upload.html b/templates/upload.html index 3c73f44..dba7366 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -3,75 +3,87 @@
-