W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: Paths exposed in input type=file (was: Re: Moving File API: Directories and System API to Note track?)

From: Darin Fisher <darin@chromium.org>
Date: Fri, 21 Sep 2012 15:58:27 -0700
Message-ID: <CAP0-QptzOkaUZ-bcutdo58JbyKTxFhcwuvekShMYTJimU6-POg@mail.gmail.com>
To: James Graham <jgraham@opera.com>
Cc: public-webapps@w3.org
On Fri, Sep 21, 2012 at 1:14 AM, James Graham <jgraham@opera.com> wrote:

> On 09/20/2012 11:45 PM, Darin Fisher wrote:
>
>  File path information is already exposed via <input type=file multiple>.
>>
>> "File names may contain partial paths."
>> http://www.whatwg.org/specs/**web-apps/current-work/**
>> multipage/states-of-the-type-**attribute.html#concept-input-**
>> type-file-selected<http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#concept-input-type-file-selected>
>>
>
> I couldn't get any actual browser to expose paths in this way. Did I miss
> something? It also seems to be encouraging wilful violation of the FileAPI
> spec which clearly states that File objects don't return path info [1].
>
> Having a may-level conformance criterion that supposes to override a
> must-level criterion in another spec, but no strong compat. requirement,
> doesn't seem like the optimum path to interoperability or sanity of people
> trying to understand and implement the platform. Is there any reason this
> paragraph shouldn't be considered a bug in HTML?
>

I'm not sure.

Note: Chrome exposes relative file path information via
File.webkitRelativePath.  I haven't reviewed the history of this property.

Exposing partial path information like this is useful in conjunction with
<input type=file directory> [*].  It enables people to upload directories
of files to a web server.  The web server can re-create the exact directory
structure, including empty directories.

Regards,
-Darin

[*]
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-April/025764.html


>
> [1] http://dev.w3.org/2006/webapi/**FileAPI/#dfn-file<http://dev.w3.org/2006/webapi/FileAPI/#dfn-file>
>
>
>
Received on Friday, 21 September 2012 22:58:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT