updateds folder path and regex

This commit is contained in:
2026-03-18 10:19:11 +05:30
parent 5ddfb1f440
commit 1d83534a95
4 changed files with 14 additions and 9 deletions

View File

@@ -1,6 +1,16 @@
import os
from flask import current_app
from app.config import Config
def get_download_format_folder():
return os.path.join(
current_app.root_path,
"static",
"downloads",
"format"
)
def ensure_upload_folder():
if not os.path.exists(Config.UPLOAD_FOLDER):
os.makedirs(Config.UPLOAD_FOLDER)
os.makedirs(Config.UPLOAD_FOLDER)

View File

@@ -9,4 +9,4 @@ class RegularExpression:
PIPE_MM_PATTERN = re.compile(r"^pipe_\d+_mm$")
# sum fields of MH dc (d_0_to_0_75)
D_RANGE_PATTERN = re.compile( r"^d_\d+(?:_\d+)?_to_\d+(?:_\d+)?$")
D_RANGE_PATTERN = re.compile( r"^d_\d+(?:_\d+)?_to_\d+(?:_\d+)?$")