【发布时间】:2016-09-19 08:52:16
【问题描述】:
我遇到了一个非常简单的用例问题。
- 在 Dropbox 文件夹中搜索文件
- 选择要加载的文件
- 从 Dropbox 加载文件
我是这样尝试的:
from("timer:start?period=60m")
//Load list of files
.to("dropbox://search?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath={{remotePath}}")
//Create list of files to load
.bean(FileHandlerBean.class, "prepareOperations")
.split(simple("${body}"))
//Load file from dropbox
.recipientList(simple("dropbox://get?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${body.dropBoxFilePath}"))
[...]
通常这应该有效,但是当 remotePath 包含带有空格的文件名时,例如 2015-05-16 18.43.56.jpg,DropboxConfigurationValidator 会引发异常。
我尝试使用 URLEncoder:
URLEncoder.encode(dbxEntry.path, "UTF-8")
但这无济于事。 我调试了组件,可以看到,当 DropBoxComponent 获取参数时,“+”被转换回空格。
有什么办法可以解决这个问题吗?
使用 Camel 版本 2.17.1
【问题讨论】:
-
感谢您创建了一个 JIRA 并为 PR 提供了修复 - 这就是它的完成方式:issues.apache.org/jira/browse/CAMEL-10334
标签: apache-camel