Re: Directory Upload Proposal

On Mon, Apr 27, 2015 at 9:45 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> On Thu, Apr 23, 2015 at 12:28 PM, Ali Alabbas <alia@microsoft.com> wrote:
>> Hello WebApps Group,
>
> Hi Ali,
>
> Yay! This is great to see a formal proposal for! Definitely something
> that mozilla is very interested in working on.
>
>> If there is sufficient interest, I would like to work on this within the scope of the WebApps working group.
>
> I personally will stay out of WG politics. But I think the proposal
> will receive more of the needed attention and review in this WG than
> in the HTML WG. But I'm not sure if W3C policies dictate that this is
> done in the HTML WG.
>
>> [4] Proposal: http://internetexplorer.github.io/directory-upload/proposal.html
>
> So, some specific feedback on the proposal.
>
> First off, I don't think you can use the name "dir" for the new
> attribute since that's already used for setting rtl/ltr direction.
> Simply renaming the attribute to something else should fix this.
>
> Second, rather than adding a .directory attribute, I think that we
> should simply add any selected directories to the .files list. My
> experience is that having a direct mapping between what the user does,
> and what we expose to the webpage, generally results in less developer
> confusion and/or annoyance.
>
> My understanding is that the current proposal is mainly so that if we
> in the future add something like Directory.enumerateDeep(), that that
> would automatically enable deep enumeration through all user options.
> However that could always be solved by adding a
> HTMLInputElement.enumerateFilesDeep() function.

Oh, there's another thing missing that I missed. We also need some
function, similar to .click(), which allows a webpage to
programmatically bring up a directory picker. This is needed on
platforms like Windows and Linux which use separate platform widgets
for picking a directory and picking a file. Many websites hide the
default browser provided <input type=file> UI and then call .click()
when the user clicks the website UI.

A tricky question is what to do on platforms that don't have a
separate directory picker (like OSX) or which doesn't have a concept
of directories (most mobile platforms). We could either make those UAs
on those platforms not have the separate .clickDirectoryPicker()
function (or whatever we'll call it), or make them have it but just do
the same as .click().

/ Jonas

Received on Wednesday, 29 April 2015 00:25:45 UTC