Topic: Showing Folder dialog vs File dialog in Chrome

I'm using plupload 2.1.8 and am wondering why - in either the UI or queue widgets - that when I click Add Files and am using Chrome, that the file dialog is displayed, not the folder dialog.

My goal is to allow the user to select a folder, not files.  To accomplish this, I made a change to the FileInput function in moxie.js as follows:

Original:
shimContainer.innerHTML = '<input id="' + I.uid +'" type="file" style="font-size:999px;opacity:0;"' +
(_options.multiple && I.can('select_multiple') ? 'multiple' : '') +
(_options.directory && I.can('select_folder') ? 'webkitdirectory directory' : '') + // Chrome 11+
(mimes ? ' accept="' + mimes.join(',') + '"' : '') + ' />';

Mine:
shimContainer.innerHTML = '<input id="' + I.uid + '" type="file" style="font-size:999px;opacity:0;"' +
(_options.multiple && I.can('select_multiple') ? 'multiple' : '') +
(mimes ? ' accept="' + mimes.join(',') + '"' : '') +
(/chrome/i.test(navigator.userAgent) ? 'webkitdirectory directory' : '') + ' />'; // Chrome 11+


In the original, it appears as though the conditionals dictating 'webkitdirectory directory' are false.  Can anybody tell me if this is an issue with the moxie.js library, or what the intended behavior is?  Before I change moxie.js for my own use, I'd rather make sure first that I'm using it correctly.

Thanks.

Re: Showing Folder dialog vs File dialog in Chrome

A topic here might be somewhat helpful for everybody looking for the answer for the same question: http://www.plupload.com/punbb/viewtopic … 321#p29321

If you want to see your issue fixed, do not report it here, do it on - GitHub.