Kirk Ouimet
Kirk Ouimet

Reputation: 28364

Is it possible to upload a directory of files with XHR?

I'm seeing that I can select a folder with an input, but it appears that I have no way of recursing through the files in that folder to upload them via XHR.

Upvotes: 4

Views: 519

Answers (1)

tkone
tkone

Reputation: 22728

Yes*

<input type=file name=files id=files multiple>

* only works on very recent browsers. You should get array of the data you'd normally get from a single file upload element and from there you're off to the races with HTML5

Other than that you're stuck with something like: http://swfupload.org/

And by recent I mean it's working in Firefox 8, Safari 5.1 and Google Chrome 15 all installed on my Mac. But these are the latest versions.

Upvotes: 1

Related Questions