Binary Store
The Binary Store component allows you to store binaries in the Content Store.
The component will take a stream reference in the binary
key of the incoming object and use it to store the binary into a Mongo database.
It's also possible to use a file path reference in the path
key when the binary stream is not available in the object.
Configuration
Inputs | Outputs
The component will look on the incoming message for the
The binary key must contain a stream reference. The path key must contain a path to the file on the local system. In order to access the local filesystem, the
When using the binary key, an
Example: Using a stream Example: Using a file from the local file system: Example: Using a payload
binary
key. If there is no binary
key, the component will look for path
key. If both are not present, the component will look for the payload
key. If none of the keys are present in the incoming message, one of the component settings File Path
or Payload
is required. If both a file path and a payload are provided, the file path takes priority.The binary key must contain a stream reference. The path key must contain a path to the file on the local system. In order to access the local filesystem, the
XILL4_WORKDIRS
environment variable must be set to the path of the directory to be accessed.When using the binary key, an
_id
field must be specified in the incoming message. This will be used as the _id
and the filename in the Content Store. When using path
or payload
, the _id
and filename will be generated by hashing the file path or the payload (using SHA512). You can specify the _id
field in the incoming message to override the generated _id
.{
"_id": "6232dea643dbbf33e0906e85",
"binary": // containing a readable stream
}
{ "path": "C://Users/xillio/Downloads/test-file.json" }
{ "payload": "test payload" }