same changes of sub-cont dashboard

This commit is contained in:
2026-03-18 17:18:05 +05:30
parent 1d83534a95
commit 6e4406519a
5 changed files with 226 additions and 75 deletions

View File

@@ -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())