camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamil (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-11680) Camel-dropbox should support Put not only from localPath
Date Thu, 07 Sep 2017 18:38:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157409#comment-16157409
] 

Kamil commented on CAMEL-11680:
-------------------------------

This:
{code}
from("direct:dropBoxPut")
.convertBodyTo(byte[].class)
.toD("dropbox:put?uploadMode=force&remotePath=/file.xml&accessToken={{dropbox.key}}")
{code}
works fine with the snapshot, but this (as you suggested in new documentation):
{code}
from("direct:dropBoxPut")
.convertBodyTo(byte[].class)
.setHeader(DropboxConstants.HEADER_PUT_FILE_NAME, constant("myfile.xml"))
.toD("dropbox:put?uploadMode=force&remotePath=/&accessToken={{dropbox.key}}")
{code}
throws:
{code}
org.apache.camel.component.dropbox.util.DropboxException: / exists on dropbox and is not a
file!
	at org.apache.camel.component.dropbox.core.DropboxAPIFacade.putBody(DropboxAPIFacade.java:186)
~[camel-dropbox-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
	at org.apache.camel.component.dropbox.core.DropboxAPIFacade.put(DropboxAPIFacade.java:95)
~[camel-dropbox-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
	at org.apache.camel.component.dropbox.integration.producer.DropboxPutProducer.process(DropboxPutProducer.java:50)
~[camel-dropbox-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
	at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:132)
~[camel-core-2.20.0-SNAPSHOT.jar:2.20.0-SNAPSHOT]
{code}

> Camel-dropbox should support Put not only from localPath
> --------------------------------------------------------
>
>                 Key: CAMEL-11680
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11680
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-dropbox
>            Reporter: Kamil
>            Assignee: Claus Ibsen
>             Fix For: 2.20.0
>
>
> Currently if I want to Put file on Dropbox using Camel-Dopbox I must create temporary
file, write to it using file:// and then use: 
> {code}
> dropbox://put?localPath=${header.myTempFile}
> {code}
> which is tedious.
> Camel-dropbox should support writing directly from Exchange



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message