same changes of sub-cont dashboard
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import os
|
||||
from flask import current_app
|
||||
from app.config import Config
|
||||
|
||||
|
||||
# file extension
|
||||
ALLOWED_EXTENSIONS = {"xlsx", "xls", "csv"}
|
||||
|
||||
|
||||
def get_download_format_folder():
|
||||
@@ -11,6 +14,13 @@ def get_download_format_folder():
|
||||
"format"
|
||||
)
|
||||
|
||||
def get_uploads_folder():
|
||||
return os.path.join(
|
||||
current_app.root_path,
|
||||
"static",
|
||||
"uploads"
|
||||
)
|
||||
|
||||
def ensure_upload_folder():
|
||||
if not os.path.exists(Config.UPLOAD_FOLDER):
|
||||
os.makedirs(Config.UPLOAD_FOLDER)
|
||||
if not os.path.exists(get_uploads_folder()):
|
||||
os.makedirs(get_uploads_folder())
|
||||
Reference in New Issue
Block a user