89.8. 삽입(upload) 작업


Dropbox에 파일을 업로드합니다.

Camel 생산자로 작동합니다.

다음은 이 작업에 대한 옵션 목록입니다.

Expand
속성필수설명

uploadMode

true

add or force this option specifies how a file should be saved on dropbox: in case of "add" the new file will be renamed if a file with the same name already exists on dropbox. 같은 이름의 파일이 dropbox에 이미 존재하는 경우 이 파일을 덮어씁니다.

localPath

false

로컬 파일 시스템에서 Dropbox에 업로드할 폴더 또는 파일입니다. 이 옵션을 구성한 경우 Camel 메시지 본문의 콘텐츠가 포함된 단일 파일로 업로드하는 것보다 우선합니다(메시지 본문이 바이트 배열로 변환됨).

remotePath

false

Dropbox의 폴더 대상. 속성이 설정되지 않은 경우 구성 요소는 로컬 경로와 동일한 원격 경로에 파일을 업로드합니다. Windows 또는 절대 localPath가 없는 경우 다음과 같은 예외로 실행할 수 있습니다.

java.lang.IllegalArgumentException: 'path': bad path: "/": "C:/My/File"
OR
Caused by: java.lang.IllegalArgumentException: 'path': "MyFile": "MyFile"로 시작해야 합니다.

89.8.1. 샘플

from("direct:start").to("dropbox://put?accessToken=XXX&clientIdentifier=XXX&uploadMode=add&localPath=/root/folder1")
  .to("mock:result");

from("direct:start").to("dropbox://put?accessToken=XXX&clientIdentifier=XXX&uploadMode=add&localPath=/root/folder1&remotePath=/root/folder2")
  .to("mock:result");

및 메시지 본문의 콘텐츠가 포함된 단일 파일을 업로드

from("direct:start")
   .setHeader(DropboxConstants.HEADER_PUT_FILE_NAME, constant("myfile.txt"))
   .to("dropbox://put?accessToken=XXX&clientIdentifier=XXX&uploadMode=add&remotePath=/root/folder2")
   .to("mock:result");

파일 이름은 우선 순위에 따라 DropboxConstants.HEADER_PUT_PUT_FILE_NAME 또는 Exchange.FILE_NAME 헤더에 제공될 수 있습니다. 헤더가 제공되지 않으면 메시지 id(uuid)가 파일 이름으로 사용됩니다.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동