How to create a signal for a webkitdirectory input
I have an app which looks like this:
How do I extract the list of files from that input?
How do I extract the list of files from that input?
import { createSignal, type Component } from 'solid-js';
const App: Component = () => {
const [files, setFiles] = createSignal(/* What do I put here? */)
return (
<main>
<form onsubmit={(ev) => ev.preventDefault()}>
{/* @ts-expect-error */}
<input type="file" id='files' webkitdirectory directory multiple />
<input type='submit' value="Submit" />
</form>
</main>
);
};
export default App;