Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ import traceback # For detailed error logging
|
|
14 |
# --- Configuration ---
|
15 |
# Use the provided ConvertAPI secret
|
16 |
convertapi.api_secret = 'secret_8wCI6pgOP9AxLVJG'
|
17 |
-
|
18 |
# Define a temporary directory for generated files
|
19 |
UPLOAD_FOLDER = 'temp_files'
|
20 |
if not os.path.exists(UPLOAD_FOLDER):
|
@@ -461,7 +461,7 @@ def index():
|
|
461 |
print(f"Attempting PDF conversion for {docx_filepath}...")
|
462 |
try:
|
463 |
# Check API key again before conversion attempt
|
464 |
-
if not convertapi.
|
465 |
flash("La clé API pour ConvertAPI n'est pas configurée correctement. Impossible de générer le PDF.", "error")
|
466 |
# Optionally send the docx as fallback?
|
467 |
# return send_file(docx_filepath, as_attachment=True, download_name=docx_filename)
|
|
|
14 |
# --- Configuration ---
|
15 |
# Use the provided ConvertAPI secret
|
16 |
convertapi.api_secret = 'secret_8wCI6pgOP9AxLVJG'
|
17 |
+
convertapi.api_credentials = 'secret_8wCI6pgOP9AxLVJG'
|
18 |
# Define a temporary directory for generated files
|
19 |
UPLOAD_FOLDER = 'temp_files'
|
20 |
if not os.path.exists(UPLOAD_FOLDER):
|
|
|
461 |
print(f"Attempting PDF conversion for {docx_filepath}...")
|
462 |
try:
|
463 |
# Check API key again before conversion attempt
|
464 |
+
if not convertapi.api_credentials or convertapi.api_credentials = 'secret_8wCI6pgOP9AxLVJG':
|
465 |
flash("La clé API pour ConvertAPI n'est pas configurée correctement. Impossible de générer le PDF.", "error")
|
466 |
# Optionally send the docx as fallback?
|
467 |
# return send_file(docx_filepath, as_attachment=True, download_name=docx_filename)
|