html5 - How do I use Google Chrome 11's Upload Folder feature in my own code? -


google chrome 11 supports uploading folders. feature implemented in google docs, , have been unable find api documentation on how use in code.

from can see, click upload folder link in google docs, displays "browse folder" dialog (a call shbrowseforfolder looks of it), select folder, , contents of folder uploaded google docs.

as feature requires upgrading google chrome latest version, or other browsers running java applet, assume can use feature in own websites?

i love have feature in content management system maintain!

you should able see demo here: http://html5-demos.appspot.com/static/html5storage/demos/upload_directory/index.html

basically works setting attribute "webkitdirectory" on file input element.

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

then when user has selected folder, itterates across "e.target.files" object list of files included in selection (this enables have access files clientside).

drag , drop similar, when listen "ondrop" event on "draggable" element, if a directory or selection of files dropped on element, "files" property on event list of files contained in operation.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -