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,5 +1,6 @@
from flask import Blueprint, render_template, send_from_directory, abort, current_app
from app.utils.helpers import login_required
from app.utils.file_utils import get_download_format_folder
import os
file_format_bp = Blueprint("file_format", __name__)
@@ -14,10 +15,7 @@ def download_format():
@login_required
def download_excel_format(filename):
download_folder = os.path.join(
current_app.root_path, "static", "downloads/format"
)
download_folder = get_download_format_folder()
file_path = os.path.join(download_folder, filename)
if not os.path.exists(file_path):