Yes.<div><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 3:15 PM, John Gregg <span dir="ltr"><<a href="mailto:johnnyg@google.com">johnnyg@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

So are you suggesting an input element that accepts directories<br>
dragged onto it, but has no way of choosing a directory through a<br>
system dialog?<br>
<font color="#888888"><br>
 -John<br>
</font><div><div></div><div class="h5"><br>
On Thu, Apr 22, 2010 at 3:11 PM, Ojan Vafai <<a href="mailto:ojan@chromium.org">ojan@chromium.org</a>> wrote:<br>
> But there is already a default UI that lets you select a folder, a file or<br>
> both (drag-drop). I don't see why this forces the UA to do anything. Just<br>
> because you can select both folders and files doesn't mean the UA needs to<br>
> expose extra UI on top of drag-drop to let you do so. Again, no more so than<br>
> they already have to expose extra UI to deal with multiple inputs.<br>
> Ojan<br>
><br>
> On Tue, Apr 6, 2010 at 2:28 PM, John Gregg <<a href="mailto:johnnyg@google.com">johnnyg@google.com</a>> wrote:<br>
>><br>
>> The most relevant issue is that in Windows/Mac/Linux, there are no system<br>
>> dialogs that let the user select either a folder or a file.  They each have<br>
>> separate "choose a file" and "choose a folder" dialogs.  I think the logical<br>
>> reason for that is that when selecting a file, clicking a directory means to<br>
>> enter that directory and select from its files, not to choose that directory<br>
>> as the result of selection.<br>
>> Thus we would force UAs to reinvent file-picker interfaces in order to<br>
>> deal with an input element that allows both folders and files.<br>
>>  -John<br>
>> On Tue, Apr 6, 2010 at 2:18 PM, Ojan Vafai <<a href="mailto:ojan@chromium.org">ojan@chromium.org</a>> wrote:<br>
>>><br>
>>> It's unfortunate that users need to distinguish between single and<br>
>>> multiple file inputs. That's not something we can change at this point. The<br>
>>> web started with single file inputs. We can avoid adding a third type of<br>
>>> file input they need to understand though.<br>
>>> Also, what should happen if you drag files and folders onto a "multiple"<br>
>>> or "directory" input? Just drop the ones that are of the wrong type? I<br>
>>> cannot imagine users making sense of that.<br>
>>> It's not clear to me from your original email what issues you encountered<br>
>>> during implementation that led to this proposal. Is it just the leaf name<br>
>>> conflict issue? I agree that's a problem, but maybe there's a different<br>
>>> solution to that?<br>
>>> Ojan<br>
>>> On Tue, Apr 6, 2010 at 12:53 PM, John Gregg <<a href="mailto:johnnyg@google.com">johnnyg@google.com</a>> wrote:<br>
>>>><br>
>>>> That's a fair question, but how is it clear today whether an input can<br>
>>>> accept multiple files vs. a single file using drag-and-drop?  Currently if I<br>
>>>> drag multiple files onto an input that doesn't have 'multiple', I get only<br>
>>>> the first one.  (In Chrome.)<br>
>>>> Some good default text from the UA, like "Choose folder..." instead of<br>
>>>> "Choose file...", would go far to solve that, I think.<br>
>>>>  -John<br>
>>>> On Tue, Apr 6, 2010 at 12:38 PM, Ojan Vafai <<a href="mailto:ojan@chromium.org">ojan@chromium.org</a>> wrote:<br>
>>>>><br>
>>>>> What about drag-drop? I should be able to drag a directory, a file, or<br>
>>>>> a list of files onto an input, no? If not, how is this distinction shown to<br>
>>>>> users? How will it be clear to users when they can do one or the other?<br>
>>>>> Ojan<br>
>>>>><br>
>>>>> On Thu, Apr 1, 2010 at 3:53 PM, John Gregg <<a href="mailto:johnnyg@google.com">johnnyg@google.com</a>> wrote:<br>
>>>>>><br>
>>>>>> For context, Ian Fette started a thread about uploading directories of<br>
>>>>>> files in<br>
>>>>>> December: <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-December/024455.html" target="_blank">http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-December/024455.html</a><br>


>>>>>><br>
>>>>>> At that time, it was thought that directory upload could be<br>
>>>>>> implemented by a UA in response to a <input type="file" multiple> tag using<br>
>>>>>> different UI only, and modifying the FileAPI spec to allow path information<br>
>>>>>> in the form<br>
>>>>>><br>
>>>>>> input.files[0].name="1.jpg"<br>
>>>>>> input.files[0].path="a"<br>
>>>>>> input.files[1].name="2.jpg"<br>
>>>>>> input.files[1].path="a/b"<br>
>>>>>> input.files[2].name="3.jpg"<br>
>>>>>> input.files[2].path="a/c"<br>
>>>>>><br>
>>>>>> I've started developing a prototype of this in WebKit/Chromium.  Based<br>
>>>>>> on what I've encountered so far, I would like to propose adding directory<br>
>>>>>> upload functionality using an explicit new 'directory' attribute on the file<br>
>>>>>> input element.<br>
>>>>>> The existing behavior of <input type="file" multiple> would not<br>
>>>>>> change, but when processing <input type="file" directory>, the UA would<br>
>>>>>> display a directory selection UI and store the path information, and not<br>
>>>>>> allow individual files to be selected.  It would allow multiple files to<br>
>>>>>> have the same leaf name (.name attribute), as long as the paths were<br>
>>>>>> different.  The path attributes would include the name of the chosen<br>
>>>>>> directory<br>
>>>>>><br>
>>>>>> This would be preferable for several reasons:<br>
>>>>>>  - Most built-in file system UI on major platforms (Windows/Mac/Linux)<br>
>>>>>> have distinct dialogs for choosing files and choosing directories.  Allowing<br>
>>>>>> the UA to use these directly makes sense rather than creating hybrids.<br>
>>>>>>  - Avoiding "leaf name" conflicts in a directory tree is not feasible<br>
>>>>>> in many applications -- asking a user to ensure unique photo names in a<br>
>>>>>> large set of albums before uploading would fail to meet that use case.<br>
>>>>>>  Therefore HTML documents should know in advance whether the path<br>
>>>>>> information will be relevant in the eventual storage of the files.  Sites<br>
>>>>>> currently using <input type="file" multiple> would have compatibility<br>
>>>>>> problems with an implementation which allowed conflicting file names along<br>
>>>>>> different paths.<br>
>>>>>> What are your thoughts about adding the 'directory' attribute?<br>
>>>>>> Thanks,<br>
>>>>>>  -John<br>
>>>><br>
>>><br>
>><br>
><br>
><br>
</div></div></blockquote></div><br></div>