Hello. I am wondering if it is possible to add a directory that is inputted by a user. I know it is possible to add local directories.
Here is some code I am working with:
function App() {
async function handleFile(e) {
const files = e.target.files
for await (const file of client.addAll(files)) {
console.log(file.path)
}
}
return (
<div className="App">
<input type="file" webkitdirectory directory multiple accept="audio/*" onChange={handleFile}/>
</div>
);
}
This just adds each file individually and returns the cid. I want to wrap all files in a directory and return the cid of the directory.