ميزه: إضافة ميزات جديدة لتحرير PDF، OCR، وإزالة الخلفية مع تفعيل خيارات في ملف البيئة

This commit is contained in:
Your Name
2026-03-08 22:51:50 +02:00
parent d7f6228d7f
commit 0a0c069a58
16 changed files with 242 additions and 62 deletions

View File

@@ -22,8 +22,8 @@ ALLOWED_OCR_TYPES = ALLOWED_IMAGE_TYPES + ["pdf"]
def _check_feature_flag():
"""Return an error response if FEATURE_EDITOR is disabled."""
if not current_app.config.get("FEATURE_EDITOR", False):
"""Return an error response if FEATURE_OCR is disabled."""
if not current_app.config.get("FEATURE_OCR", True):
return jsonify({"error": "This feature is not enabled."}), 403
return None