ZIP create / extract / list
ai_zipCreate, extract, or list ZIP archives locally, with zip-slip protection and configurable size/file limits for safe archive handling.
Instructions
Work with ZIP archives locally. action "create": zip files and folders (given as paths; folders keep their own name as the top folder, symlinks are skipped) into one .zip. action "extract": unpack a .zip (path or base64) into the "output" folder; entries with "..", absolute paths or drive letters are refused (zip-slip protection), existing files are kept unless overwrite is true. action "list": entry names with sizes, no extraction. Limits: total uncompressed size 500 MB and 10000 files by default (maxTotalMB / maxFiles). Encrypted ZIPs are not supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | extract / list: the ZIP archive, a local path or base64. | |
| files | No | create: files and folders to add (local paths). | |
| level | No | create: compression level 0 (store) to 9 (smallest). Default 6. | |
| action | Yes | ||
| output | No | create: the .zip path (or a folder ending in "/"). extract: the folder to extract into. Default: the server output folder. | |
| maxFiles | No | Cap on the number of entries. Default 10000. | |
| overwrite | No | extract: replace files that already exist in the output folder. Default false (they are skipped). | |
| maxTotalMB | No | Cap on the total uncompressed size, MB. Default 500. |