создание, правка, удаление, скрытие инструмента

This commit is contained in:
2025-12-12 23:50:38 +03:00
parent 8b38d69980
commit f85ca7d002
19 changed files with 1607 additions and 162 deletions
Binary file not shown.
+5 -5
View File
@@ -32,7 +32,7 @@ def saveImage(file_bytes: bytes, file_name: str) -> bool:
if not target_path.lower().endswith(".png"):
target_path += ".png"
logger.info(f"[ImageSave] Saving image to {target_path}")
logger.debug(f"[ImageSave] Saving image to {target_path}")
img.save(target_path, "PNG")
return True
@@ -47,10 +47,10 @@ def deleteImage(fileName: str):
try:
import os
file_name = f"api/{file_name}"
logger.info(f"Удаляем изображение {fileName}")
os.remove(f"static/images/{fileName}")
logger.info(f"Изображение {fileName} успешно удалено")
fileName = f"api/{fileName}"
logger.debug(f"Удаляем изображение {fileName}")
os.remove(fileName)
logger.debug(f"Изображение {fileName} успешно удалено")
return True
except Exception as e:
logger.error(f"Ошибка удаления изображения: {str(e)}")