SDK 레시피›멀티 이미지 → 워터마크 → 서버 전송
Image 워크플로우

멀티 이미지 → 워터마크 → 서버 전송

여러 상품 이미지에 워터마크를 적용하고 생성된 파일을 고객 서버로 전송합니다.

files[]
→
batch-image-watermark
→
FormData upload
입력Multiple image files
최종 결과Watermarked image files
사용 Toolbatch-image-watermark

전체 코드

const result = await client.run("batch-image-watermark", {
  files: selectedFiles,
  options: {
    type: "text",
    text: "My Store",
    position: "bottom-right",
    opacity: 50
  },
  output: {
    filePrefix: "product",
    archive: true,
    archiveName: "watermarked-products"
  }
});

const form = new FormData();
for (const file of result.files) {
  form.append("files", file, file.name);
}

await fetch("/api/products/upload", {
  method: "POST",
  body: form
});

// Or upload result.archive.file when ZIP is preferred.
이 레시피를 수정하기 전에 client.describe(toolId) 또는 Tool 명세 페이지에서 정확한 파일 제한, 옵션 값과 지원 모드를 확인하세요.