So you are using something like:
<input type="file" id="file-input" webkitdirectory="" directory="">
This allows the user to download the directory. Roughly speaking, here is the code for downloading the list of downloaded files:
query("#file-input").on.change.add((e) { print(e.target.files); });
It looks like you already understood this part.
Indeed, you just get a list of files. I looked at e.target, and I donโt think that there was anything related to the directory itself. For example, I donโt see anything in the directory name, and itโs not as if you suddenly had write access to this directory. You also cannot download files from this directory the next time the user loads the page without re-selecting the directory.
However, you can download files from this directory and save a copy of these files locally using local file storage.
See also:
By the way, I know that I could not achieve exactly what you wanted, but if you approve of my answer, please accept it. My boss promised to buy me a puppy if I answer 100 questions about stack overflow;)
source share