[whatwg] Uploading directories of files

Jonas Sicking jonas at sicking.cc
Thu Dec 10 22:31:40 PST 2009


2009/12/10 Ian Fette (イアンフェッティ) <ifette at google.com>:
>> I guess I'd be ok with changing the spec to allow more of the path to
>> be exposed. However that would mean that there is a mismatch between
>> what name is submitted and what name you'd get from
>> input.files[n].name.
>>
>
> I think that the notion of allowing more of the path to be exposed and
> reconciling that with .name is where the problem lies, and would like to
> figure out if we could resolve that. I think that there is a case to be made
> for including the paths -- e.g. if I'm uploading photos to flickr, picasa,
> or facebook, I may have already organized them locally, there's no reason
> that I shouldn't be able to maintain that structure when I upload to the web
> application. The question is then how that gets reconciled with
> input.files[n].name -- I would think it preferable if .name also were
> allowed to contain that extra information -- currently we say "The name of
> the file. There are numerous file name variations on different systems; this
> is merely the name of the file, without path information." [1]. I guess I
> would propose that be changed to "The name of the file. There are numerous
> file name variations on different systems; this is merely the name of the
> file. If the user agent allows for files from multiple directories to be
> selected and included in a single FileList, path information may be included
> to distinguish between the files, provided that such path information SHOULD
> NOT include information about any path components that are common to all of
> the Files in the FileList."

If we're going to expose a full or partial path, then I think we
should do that separately from the .name property. I'd rather keep the
.name strictly be the leaf name.

/ Jonas

/ Jonas



More information about the whatwg mailing list