Start Uploading Folders in Chrome and Firefox Today

So, you’ve been looking for a way to upload folders without using Flash or Java. You heard about folder uploading on google docs but your not sure how to go about implementing it in your application. Well it’s pretty easy actually if you target chrome users with some clever javascript.
HTML5 ready browsers allow the multiple file input label so that you’re users can select a bunch of files at once from a folder. Folder uploading allows your users to select a single folder to upload and the browser takes care of the rest. All you do is add webkitdirectory as an attribute to the file input element and you’re set.

Don’t think that your server side script will be handling any type of Folder object, because in this case all that the browser does is open up the selected folder and upload all of the files inside. This operation is recursive so be warned that all of the containing files will be thrown at the server. Anyway, enjoy

1 comment

Comments are closed.