第 164 章 IPFS 组件
作为 Camel 版本 2.23 可用
ipfs: 组件提供对 Interplanetary 文件系统 (IPFS) 的访问。
Maven 用户需要将以下依赖项添加到其 pom.xml 中:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ipfs</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>164.1. URI 格式
ipfs://cmd?options
在本例中,我们将一个文件添加到 IPFS,从 IPFS 获取文件,最后访问 IPFS 文件的内容。
from("direct:start").to("ipfs:add")
from("direct:start").to("ipfs:get?outdir=target")
from("direct:start").to("ipfs:cat");
</TODO>