节点红色:将有效载荷传递给另一个节点参数

问题描述:

假设有一个注入字符串的注入"节点.

Say there is a 'inject' node that injects a string.

该字符串将由/home/jurgen/Desktop/hello.txt"组成,并将被传递到file in"节点.'file in' 节点需要在单击 'in file' 节点时指定路径,但是我想直接从注入节点传递路径.我曾尝试将 {{payload}} 放入in file"路径参数中,但没有成功.帮助.

This string will consist of '/home/jurgen/Desktop/hello.txt' and will be passed to a 'file in' node. The 'file in' node requires a path to be specified when the 'in file'node is clicked, however I would like to pass the path from the inject node directly. I have tried placing {{payload}} into the 'in file' path parameter but no luck. help.

侧边栏信息选项卡包含每个节点的文档,描述了它接受哪些消息属性来控制其行为.

The sidebar Info tab contains documentation for each node that describes what message properties it accepts to control its behaviour.

在 File In 节点的情况下,您将看到它使用 msg.filename 来设置文件名 - 只要文件名字段在节点的配置中留空即可.

In the case of the File In node, you will see that it uses msg.filename to set the filename - as long as the filename field is left blank in the node's configuration.

如果您创建的流包括:

Inject -> Change -> File In -> Debug

您可以使用 Change 节点将 msg.filename 设置为您想要使用的任何值.

You can use the Change node to set msg.filename to whatever value you want to use.