입력·출력·결과 처리›단일 파일 입력

단일 파일 입력

Use the browser File object directly. No base64 conversion is required.

HTML file control

<input id="file" type="file" accept="image/*">

Run a Tool

const file = document.querySelector("#file").files[0];

const result = await client.run("image-enhancer", {
  file,
  options: {
    preset: "balanced",
    auto: true,
    format: "jpg",
    quality: 0.92
  }
});

const outputFile = result.files[0];
Use the exact input MIME types and min/max file counts shown on each Tool Reference page.