File - ZIP Extract
Type identifier:
file:zip:extractCategory: File Operations
Description
The File - ZIP Extract node extracts files from a ZIP archive, applying security validations to prevent malicious archives from causing harm. It supports file pattern filtering and size limits, returning the extracted files as an array that can be processed by other nodes.
Input Handles
Handle | Type | Description |
|---|---|---|
| control | Triggers the extraction process. |
|
| The ZIP archive to extract. |
Output Handles
Handle | Type | Description |
|---|---|---|
|
| Array of extracted files. |
| control | Triggered when extraction completes successfully. |
| control | Triggered when extraction fails. |
Configuration Options
Option | Type | Default | Description |
|---|---|---|---|
File Pattern |
| - | Glob pattern to filter which files to extract (for example, |
Max File Size |
|
| Maximum size for any single extracted file in bytes. Maximum allowed: 1 GB. |
Behaviour
- Receives a ZIP file from the input handle
Validates the ZIP archive for security concerns:
- Total file count limit
- Maximum uncompressed size
- Compression ratio (zip bomb detection)
- Processing time limit
Iterates through archive entries, applying:
- Path sanitisation (prevents path traversal attacks)
- File pattern matching (if configured)
- Individual file size limits
- Extracts matching files
- Returns array of file entries for extracted files
- Triggers
successorerrorcontrol flow
Security Validations
Check | Limit | Description |
|---|---|---|
Max files | 5000 | Maximum number of files in archive |
Max uncompressed size | 10 GB | Total uncompressed size limit |
Compression ratio | 100:1 | Detects potential zip bombs |
Processing time | 5 minutes | Maximum time to process the archive |
Path depth | 10 levels | Maximum directory nesting |
Filename length | 255 characters | Maximum individual filename length |
Path Sanitisation
Entry names are sanitised to prevent attacks:
- Null bytes are rejected
- Path traversal (
..) is blocked - Absolute paths are rejected
- Control characters are rejected
- Windows reserved characters are rejected
File Pattern Matching
When a file pattern is specified, it uses glob matching:
*.pdf— Match all PDF filesimages/*.png— Match PNG files in images folder**/*.txt— Match text files in any subfolder
Examples
Extract All Files
Configuration:
- File Pattern: (empty — extracts all)
- Max File Size: 10 MB
Use case: Extract all files from a user-uploaded archive for processing.
Extract Specific File Types
Configuration:
- File Pattern:
*.csv - Max File Size: 5 MB
Use case: Extract only CSV files from a data archive for import.
Extract with Size Limit
Configuration:
- File Pattern:
documents/* - Max File Size: 50 MB
Use case: Extract documents from a specific folder with a larger size limit.