W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] Uploading directories of files

From: Jonas Sicking <jonas@sicking.cc>
Date: Sun, 13 Dec 2009 17:06:45 -0800
Message-ID: <63df84f0912131706tcc4e3b9k5e73e43588d706a1@mail.gmail.com>
2009/12/13 Ian Fette (????????) <ifette at google.com>:
> 2009/12/11 Anne van Kesteren <annevk at opera.com>
>>
>> On Fri, 11 Dec 2009 15:24:37 +0100, Ian Fette (????????)
>> <ifette at google.com> wrote:
>>>
>>> Ok, I sense resistance to putting it in .name. What about .path,
>>> undefined
>>> in most cases except where there is an upload including files from
>>> multiple
>>> directories, in which case .path contains the path less any path
>>> components
>>> common to all 3 (sorry, it's early morning and I can't write well before
>>> having coffee).
>>>
>>> e.g.
>>>
>>> input.files[0].name="1.jpg"
>>> input.files[0].path="a/b"
>>> input.files[1].name="2.jpg"
>>> input.files[1].path="a/b"
>>> input.files[2].name="3.jpg"
>>> input.files[2].path="a/c"
>>>
>>> (Need to figure out the exact wording, as "a" is common to all 3 but if
>>> you're uploading the entire directory "a", it may make sense to include
>>> that
>>> in the path -- but I don't feel quite as strongly about that --
>>> subfolders
>>> are certainly more important IMO.)
>>
>> Note that extensions to File should be discussed on public-webapps at w3.org.
>> At least, that's where they have been so far.
>>
>
> Anne -- happy to move the File related discussion to public-webapps at . For
> the sake of wrapping up this thread though, are there there any changes that
> would need to be made to the HTML spec to allow this behavior (including
> limited path information in the name that gets sent when the form is
> posted?)

The only change needed as far as I can tell is to say that *if* the
File objects contain any path information, that that path information
is included as part of the filename when the data is submitted.

The other change is to convince Arun that the File API spec should add
a .path property that contains (possibly partial) path information
"when that is safe". Or some such.

However I would probably in general recommend that you follow the
steps outlined in the FAQ for new features:
http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_adding_new_features_to_a_specification.3F

There the next step would be to just add a implementation to chrome.

/ Jonas
Received on Sunday, 13 December 2009 17:06:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:54 UTC