I have a question. I need to get a folder from user on the page and save hierarchy of folders' names to db. If I use IFormFile it takes only files, but I need exactly folders even if they are empty. How can I implement this?
This is form:
<form action="/Folders/Upload" method="post"
enctype="multipart/form-data">
<input type="file" directory multiple>
<input type="submit" value="Upload">
</form>
In controller I tried to get List<IFormFile>
but it takes only files if they exist in folders and if there aren't any files it's Length is 0. But I need to get hierachy of folders(their names) even if there aren't any files. Can I somehow save the whole hierachy of folders or maybe take a zip from user?