Search code examples
javascriptjqueryjquery-file-upload

jQuery fileupload to upload both directories and files


I wanted to know if there is any way to use jQuery fileupload to upload both directories and files. I saw in the documentation that it is possible to upload directories with this input type

<input type="file" name="files[]" multiple directory webkitdirectory mozdirectory>

But it says

It is also possible to allow selecting a folder (instead of files) via the file input element by adding browser-vendor specific "directory" attributes

The "instead of files" part is pretty annoying for my usage. Any ideas?


Solution

  • The uploader does not support folders and files, only folder, or only files. If you want to allow your users to upload a entire directory, using ZIP files could be nice.