{ "apiVersion": "camel.apache.org/v1", "kind": "Kamelet", "metadata": { "name": "dropbox-sink", "annotations": { "camel.apache.org/kamelet.support.level": "Stable", "camel.apache.org/catalog.version": "4.22.1", "camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjQzcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQzIDQwIiB2ZXJzaW9uPSIxLjEiIGhlaWdodD0iNDBweCI+CiA8cGF0aCBkPSJtMTIuNSAwbC0xMi41IDguMSA4LjcgNyAxMi41LTcuOC04LjctNy4zem0tMTIuNSAyMS45bDEyLjUgOC4yIDguNy03LjMtMTIuNS03LjctOC43IDYuOHptMjEuMiAwLjlsOC44IDcuMyAxMi40LTguMS04LjYtNi45LTEyLjYgNy43em0yMS4yLTE0LjdsLTEyLjQtOC4xLTguOCA3LjMgMTIuNiA3LjggOC42LTd6bS0yMS4xIDE2LjNsLTguOCA3LjMtMy43LTIuNXYyLjhsMTIuNSA3LjUgMTIuNS03LjV2LTIuOGwtMy44IDIuNS04LjctNy4zeiIgZmlsbD0iIzAwN0VFNSIvPgo8L3N2Zz4K", "camel.apache.org/provider": "Apache Software Foundation", "camel.apache.org/kamelet.group": "Dropbox", "camel.apache.org/kamelet.namespace": "Cloud" }, "labels": { "camel.apache.org/kamelet.type": "sink" } }, "spec": { "definition": { "title": "Dropbox Sink", "description": "Upload Files to Dropbox.", "required": [ "accessToken", "clientIdentifier", "remotePath", "uploadMode" ], "type": "object", "properties": { "accessToken": { "title": "Dropbox Access Token", "description": "The access Token to use to access Dropbox", "type": "string", "format": "password", "x-descriptors": [ "urn:camel:group:credentials" ] }, "clientIdentifier": { "title": "Client Identifier", "description": "Dropbox App client Identifier", "type": "string", "x-descriptors": [ "urn:camel:group:credentials" ] }, "remotePath": { "title": "Remote Path", "description": "Original file or folder to work with", "type": "string" }, "uploadMode": { "title": "Upload Mode", "description": "The uploading mode in case a file with the same name exists on Dropbox. Choose `add` or `force`. With `add`, the new file is renamed. With `force`, the existing file is overwritten.", "type": "string", "default": "add" } } }, "dependencies": [ "camel:core", "camel:dropbox", "camel:kamelet" ], "template": { "from": { "uri": "kamelet:source", "steps": [ { "choice": { "when": [ { "simple": "${header[file]}", "steps": [ { "setHeader": { "name": "CamelDropboxPutFileName", "simple": "${header[file]}" } } ] }, { "simple": "${header[ce-file]}", "steps": [ { "setHeader": { "name": "CamelDropboxPutFileName", "simple": "${header[ce-file]}" } } ] } ] } }, { "to": { "uri": "dropbox:put", "parameters": { "accessToken": "{{accessToken}}", "remotePath": "{{remotePath}}", "clientIdentifier": "{{clientIdentifier}}", "uploadMode": "{{uploadMode}}" } } } ] } } }, "propertiesSchema": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "title": "Dropbox Sink", "description": "Upload Files to Dropbox.", "required": [ "accessToken", "clientIdentifier", "remotePath", "uploadMode" ], "properties": { "accessToken": { "type": "string", "title": "Dropbox Access Token", "description": "The access Token to use to access Dropbox", "format": "password" }, "clientIdentifier": { "type": "string", "title": "Client Identifier", "description": "Dropbox App client Identifier" }, "remotePath": { "type": "string", "title": "Remote Path", "description": "Original file or folder to work with" }, "uploadMode": { "type": "string", "title": "Upload Mode", "description": "The uploading mode in case a file with the same name exists on Dropbox. Choose `add` or `force`. With `add`, the new file is renamed. With `force`, the existing file is overwritten.", "default": "add" } } } }