Existing Destination Only Upload
Apply these rules on every upload workflow:
- •Resolve destination base directory from configured runtime settings.
- •For each requested folder, search for an existing destination folder with the same name inside the destination base.
- •If the destination folder exists, continue upload for that folder.
- •If the destination folder does not exist, stop processing that folder and return an explicit error.
- •Never call folder-creation logic for missing destination folders.
- •Keep behavior per-folder, not global:
- •Existing folders upload normally.
- •Missing folders fail with clear error.
- •Report final result with counts:
- •
ok: folders uploaded - •
error: folders rejected for missing destination
- •
Use this error message pattern:
text
No existe carpeta destino con nombre '<folder_name>' dentro de BASE_STORAGE_DIR.
Before executing batch uploads, validate destination readiness:
- •Enumerate source folder names to upload.
- •Enumerate existing destination folders in
BASE_STORAGE_DIR. - •Show a preflight summary of:
- •folders allowed (exist)
- •folders rejected (missing)