16 lines
343 B
Python
16 lines
343 B
Python
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) |