Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload a whole directory through an HTML form

Is it possible to upload a folder with a file input in the browser?

I searched and found out that this might be a browser limitation and that I might need to use a Java Applet or Flash.

like image 832
Jayu Avatar asked Oct 24 '10 13:10

Jayu


People also ask

How do I upload a folder to my website?

How to upload files/folders to my website? Navigate to the folder in which you want to upload from the folder/file tree on the left. Click the File Upload or the Folder Upload icon in the upper toolbar and choose the upload item from your computer. There is no file size limit for uploads in the File Manager.


1 Answers

It's becoming possible with use of webkitdirectory.

<input type="file" webkitdirectory directory multiple />

Supported since Firefox 50, Chrome 30, Safari 11.1, Edge 14, but not on most mobile browsers as of 2019: https://caniuse.com/#feat=input-file-directory

like image 115
Alan Avatar answered Oct 26 '22 01:10

Alan