File Writer
The File Writer component takes an input file (either as a string or a stream) and writes it to the path given in the input. The local file system or a cloud storage can be used. When storing streams to a cloud storage, it might be needed to add the 'length' key in the incoming object.
note
Many cloud storage providers require additional length information to properly allocate resources and handle the upload when sending streams. To make the file-writer compatible, it also accepts the 'length' key in the incoming object when writing streams to a cloud storage.
Configuration
Inputs | Outputs
note
If the incoming data is an object containing the
path or payload keys, these values will take precedence over the Path and Payload in the configuration. For example, if the incoming data only includes a payload and the configuration defines both Payload and Path, the payload from the incoming data and the Path from the configuration will be used.The component will look at the incoming data for the binary or payload keys. If it finds both, the binary takes priority.
Example 1:
{
"binary": // containing a readable stream,
"path": "C:/Migration Data/new.xlsx"
}
Example 2:
{
"payload": "examplePayload",
"path": "C:/Migration Data/new.xlsx"
}
Example 3:
{
"binary": // containing a readable stream,
"length": // containing the length of the readable stream in bytes,
"path": "<cloud-storage>:/Migration Data/new.xlsx"
}