Files
Comparison_Project/app/utils/file_utils.py

16 lines
343 B
Python
Raw Normal View History

import os
2026-03-18 10:19:11 +05:30
from flask import current_app
from app.config import Config
2026-03-18 10:19:11 +05:30
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):
2026-03-18 10:19:11 +05:30
os.makedirs(Config.UPLOAD_FOLDER)