| name | existing-destination-only-upload |
| description | Enforce strict destination-folder policy for file uploads. Use when handling ingestion, synchronization, or transfer workflows where files must be uploaded only if the destination folder already exists. Never create missing destination folders automatically; instead return a clear error and skip that folder. |
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:
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)