try catcg

This commit is contained in:
CHIEFSOFT\ameye
2025-12-27 15:23:25 -05:00
parent ec0e1fc952
commit 28fabda7bf
+8 -1
View File
@@ -142,7 +142,14 @@ def upload_file():
filename = secure_filename(file.filename)
final_save_path = os.path.join(UPLOAD_FOLDER, filename)
logger.info(f'POST CALLED 6 {final_save_path}')
file.save(final_save_path)
try:
file.save(final_save_path)
except Exception as e:
# Catches any other exception and stores the message in 'e'
print(f"An unexpected error occurred: {e}")
if request.method == 'GET':
logger.info('GET CALLED')