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

[whatwg] Uploading directories of files

From: Markus Ernst <derernst@gmx.ch>
Date: Fri, 11 Dec 2009 09:13:52 +0100
Message-ID: <4B21FF40.30201@gmx.ch>
Ian Fette (????????) schrieb:
> 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 I understand you correctly, this would lead to differences in file 
names based on the UA, and even based on the folder that the user 
actually chose to upload. See your example:

C:\users\ian\a\b\1.jpg
C:\users\ian\a\b\2.jpg
C:\users\ian\a\c\3.jpg

1. The user anually selects files 1.jpg and 2.jpg in directory b. The 
resulting filename of the first file is "1.jpg".

2. Tho other day the user does an update, but this time selects 
directory b and does "upload all". Resulting filename: "b/1.jpg".

3. For the next update the user wants to easily upload all 3 files, 
which results in: "a/b/1.jpg".

4. Then the same action is done from another computer with a different 
UA, the file might again be named "1.jpg".

I have no idea how to handle such inconsistent behaviour on the server 
side (except adding extra code to flatten all uploaded directory 
structures before handling). I assume that HTTP upload should be kept 
simple, and more complex upload tasks should be handled with specialized 
applications, such as RadUpload[1].

[1] http://www.radinks.com
Received on Friday, 11 December 2009 00:13:52 UTC

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