2025-12-11 10:16:43 +05:30
|
|
|
import os
|
2026-03-18 10:19:11 +05:30
|
|
|
from flask import current_app
|
2025-12-11 10:16:43 +05:30
|
|
|
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"
|
|
|
|
|
)
|
|
|
|
|
|
2025-12-11 10:16:43 +05:30
|
|
|
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)
|