Describe the bug
When editing a tree node (Árboles → Estructura del árbol) and uploading an image via the Apariencia section, the application does not validate the file size at any point during the upload or form update process. However, when attempting to save the entire tree, the backend returns an HTTP 413 Content Too Large error, and the save operation fails silently from the user's perspective — only a generic "Error del backend: Se ha producido un error desconocido" toast message is displayed.
This means the user receives no actionable feedback about what went wrong or how to fix it, making the experience confusing and potentially leading to data loss.
To Reproduce
Steps to reproduce the behavior:
- Open the SITMUN 3 admin application.
- Navigate to Árboles and select an application (e.g. IDEMenorca - App turística).
- Go to the Estructura del árbol tab.
- Select a tree node and click to edit it (e.g. Inicial).
- In the Apariencia section, upload a large image file (e.g. 3840×2160px) using the Archivo local button.
- Observe that no warning or error is shown during the upload.
- Click Actualiza to update the form — observe that no error is shown at this stage either.
- Click the save button (💾) to save the full tree.
- Observe that the save fails with a generic backend error toast, and the browser console shows:
PUT https://ide.cime.es/stm3/backend/api/tree-nodes/2 413 (Content Too Large)
[Error] Error saving tree node
[Error] Save failed
Expected behavior
The application should validate the image file size either:
- At upload time (client-side), preventing oversized files from being accepted, or
- At form update time (Actualiza), showing a clear and descriptive error message before the user attempts to save the tree.
In either case, the user should be informed of the maximum allowed file size and guided on how to resolve the issue.
Screenshots
No problem when updating through 'Actualiza' button

Describe the bug
When editing a tree node (Árboles → Estructura del árbol) and uploading an image via the Apariencia section, the application does not validate the file size at any point during the upload or form update process. However, when attempting to save the entire tree, the backend returns an HTTP 413 Content Too Large error, and the save operation fails silently from the user's perspective — only a generic "Error del backend: Se ha producido un error desconocido" toast message is displayed.
This means the user receives no actionable feedback about what went wrong or how to fix it, making the experience confusing and potentially leading to data loss.
To Reproduce
Steps to reproduce the behavior:
PUT https://ide.cime.es/stm3/backend/api/tree-nodes/2 413 (Content Too Large)
[Error] Error saving tree node
[Error] Save failed
Expected behavior
The application should validate the image file size either:
In either case, the user should be informed of the maximum allowed file size and guided on how to resolve the issue.
Screenshots
No problem when updating through 'Actualiza' button