Text ZIP Reducer
Overview
Text ZIP Reducer is a reducer that produces a JSON containing the Base64 encoding and the path of a ZIP file that contains text files taken from the output of the blocks of the reference context.
In other words, a Text ZIP Reducer block, put after a context, creates text files out of context output and puts those files in a ZIP archive.
Input
A Text ZIP Reducer block has the following input variables:
text(string, optional): the plain text of the file to add to the output ZIP.json(object, optional): JSON whose string representation becomes the text of the file to add to the output ZIP file.path(string, required): Name or path of the file to add to the output ZIP.
One between text and json is required and excludes the other, so if text has a value json must not have a value and vice versa.
Block properties
The properties of a Text ZIP reducer block are accessed by editing the block and are divided into these groups:
-
Basic properties:
- Block name
- Component version (read only)
- Block ID (read only)
-
Functional:
- Context to reduce: reference context. It is chosen from a drop-down. To remove the choice, select Clear
. - ZIP File name: the name of the ZIP file to generate.
- Context to reduce: reference context. It is chosen from a drop-down. To remove the choice, select Clear
-
Deployment:
The deployment properties of this component are the same as those of several others, so they are described in the same article.
-
Input: input properties correspond to the input variables of the component (see above) and must be set to the output keys of blocks of the reference context.
-
Output: read-only, the manifest of the component output, that is:
- The Base64 encoding of the ZIP file.
- The name of the ZIP file.