If i want to take a file as a input in HTML i will be using
<input type="file">
Now my question is, is it possible to take a whole directory as a input,if yes how to do that?
The <input type="file"> defines a file-select field and a "Browse" button for file uploads. To define a file-select field that allows multiple files to be selected, add the multiple attribute. Tip: Always add the <label> tag for best accessibility practices!
webkitdirectory is a property that reflects the webkitdirectory HTML attribute and indicates that the <input> element should let the user select directories instead of files. When a directory is selected, the directory and its entire hierarchy of contents are included in the set of selected items.
Click the New Directory button to add a new folder inside your current directory. The project root is the default if you don't have another directory selected. Enter your new directory's name in the yellow text field to give it a name.
Step 1: Create a Folder Structure For Your Web Page First, open Finder (in Mac) or Explorer (in Windows). Next, create a folder (also known as a directory) called DevProject. This folder will contain all of the files for your HTML and CSS project. Open the DevProject folder.
Not explicitly through HTML (although I'm not sure about HTML 5). You need some Java applet or Flash movie to do it. One way I do it is by using a custom PHP script that takes in a zip or tar file and decompresses it on the back end then dumps it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With