Entrée multi-fichiers
For Tools whose input allows more than one file, pass an array through files.
HTML
<input id="files" type="file" multiple>
Convert FileList to File[]
const selectedFiles = Array.from(
document.querySelector("#files").files
);Merge PDF
const result = await client.run("merge-pdf", {
files: selectedFiles
});
const mergedPdf = result.files[0];Images to PDF
const result = await client.run("images-to-pdf", {
files: selectedFiles
});Do not guess whether a Tool uses file or files. Check client.describe(toolId).input or the generated Tool Reference page.