PageSourceSearch

https://www.inpi.fr/themes/custom/eolas_theme/eolas_base/theme/components/form/javascript/file.js?tm4lor

js inpi.fr collected 2026-10-01 08:01:23 UTC 1,000 bytes, 31 lines download raw bytes

1// INPUT FIELD FILE
2const InputFile = () => {
3  const fileButtons = document.querySelectorAll(".js-input-file-button");
4
5  fileButtons.forEach((fileButton) => {
6    const parentDiv = fileButton.parentElement;
7    const fileBrowserInput = parentDiv.firstElementChild;
8    const fileBrowserName = fileButton.querySelector(".js-input-file-name");
9
10    fileButton.addEventListener("click", () => {
11      fileBrowserInput.click();
12    });
13
14    fileBrowserInput.addEventListener("change", () => {
15      const selectedFileNames = Array.from(fileBrowserInput.files).map(
16        (file) => file.name
17      );
18
19      if (selectedFileNames.length === 1) {
20        fileBrowserName.innerText = selectedFileNames[0];
21      } else if (selectedFileNames.length > 1) {
22        fileBrowserName.innerText = selectedFileNames.join(", ");
23      }
24    });
25  });
26};
27
28const load_InputFile = window.addEventListener("DOMContentLoaded", InputFile);
29
30// export your function at the bottom as follows
31export { load_InputFile };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.