You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/03/24 10:19:25 UTC
[camel-kamelets] 01/03: Added Dropbox Sink Kamelet
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch dropbox-sink-kamelet
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 1367167e087a96cf8e919221005681e10e1029a9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 24 11:17:23 2021 +0100
Added Dropbox Sink Kamelet
---
dropbox-sink.kamelet.yaml | 69 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/dropbox-sink.kamelet.yaml b/dropbox-sink.kamelet.yaml
new file mode 100644
index 0000000..ed060c1
--- /dev/null
+++ b/dropbox-sink.kamelet.yaml
@@ -0,0 +1,69 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: dropbox-sink
+ annotations:
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjQzcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQzIDQwIiB2ZXJzaW9uPSIxLjEiIGhlaWdodD0iNDBweCI+CiA8cGF0aCBkPSJtMTIuNSAwbC0xMi41IDguMSA4LjcgNyAxMi41LTcuOC04LjctNy4zem0tMTIuNSAyMS45bDEyLjUgOC4yIDguNy03LjMtMTIuNS03LjctOC43IDYuOHptMjEuMiAwLjlsOC44IDcuMyAxMi40LTguMS04LjYtNi45LTEyLjYgNy43em0yMS4yLTE0LjdsLTEyLjQtOC4xLTguOC [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Dropbox Sink"
+ description: |-
+ Upload Files to Dropbox.
+
+ The Kamelet expects the following headers to be set:
+
+ - `file` / `ce-file`: as the file name to upload
+
+ If the header won't be set the exchange ID will be used as file name.
+ required:
+ - accessToken
+ - clientIdentifier
+ - remotePath
+ - uploadMode
+ properties:
+ accessToken:
+ title: Dropbox Access Token
+ description: The access Token to use to access Dropbox
+ type: string
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ clientIdentifier:
+ title: The client identifier
+ description: Dropbox App client Identifier
+ type: string
+ remotePath:
+ title: Remote path
+ description: Original file or folder to work with
+ type: string
+ uploadMode:
+ title: Upload Mode
+ description: Which mode to upload. in case of add the new file will be renamed if a file with the same name already exists on dropbox. in case of force if a file with the same name already exists on dropbox, this will be overwritten. The value can be one of add, force.
+ type: string
+ default: add
+ flow:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - choice:
+ when:
+ - simple: "${header[file]}"
+ steps:
+ - set-header:
+ name: CamelDropboxPutFileName
+ simple: "${header[file]}"
+ - simple: "${header[ce-file]}"
+ steps:
+ - set-header:
+ name: CamelDropboxPutFileName
+ simple: "${header[ce-file]}"
+ - to:
+ uri: 'dropbox:put'
+ parameters:
+ accessToken: '{{accessToken}}'
+ remotePath: '{{remotePath}}'
+ clientIdentifier: '{{clientIdentifier}}'
+ uploadMode: '{{uploadMode}}'
+