from datetime import datetime import os # from PySide6.QtWidgets import QMessageBox def create_filename(prefix: str = "propusk") -> str: file_name = os.path.join(os.environ.get('PHOTO_DIR'), F"{prefix}_{datetime.now().timestamp()}") match prefix: case 'pdf': file_name = F"{file_name}.pdf" case _ : file_name = F"{file_name}.jpg" return file_name