3

I want visitors of my websites to select a directory with files and then process them in JavaScript. I know how to let them select lots of individual files but not whole directories, which is pretty important here.

How can it be done? The processing of the files must be done in JavaScript. It should work in newest Firefox, Chrome and, if possible, IE.

I cannot tell them to zip the files and then select the zip since it can be a few GB of files to process.

Maybe Flash could help?

6
  • 1
    possible duplicate of How to get folder directory from HTML input type "file" or any other way? Commented Sep 23, 2014 at 22:20
  • @LJ_1102 Thanks, but it was 2 years ago and wasn't solved. Commented Sep 23, 2014 at 22:22
  • 1
    @Tom since you mentioned Flash: See this and this Commented Sep 23, 2014 at 22:25
  • @Meredith Thanks, I know that but I would rather have something that works with Flash than doesn't work at all :) Commented Sep 23, 2014 at 22:31
  • @Tom do you want to do this server-side or client-side? If server-side you could check out NodeJS's file API Commented Sep 23, 2014 at 23:20

1 Answer 1

3

Found that looking for an example myself, but I did not explore the source yet. Works on Chrome on Windows 8.1. Hope this helps someone.

HTML5 Photo Browser for Local Files and Directories

It uses:

\< input type="file" id="file_input" webkitdirectory="" directory="">

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.