[whatwg] Upload enhancements

Jan Tosovsky jan.tosovsky.cz at gmail.com
Thu Oct 3 12:16:40 PDT 2013


Dear All,

I've seen many similar threads with <input type=file> proposals, but also
lot of people taking the current spec as sufficient for the majority of use
cases.

I'd like to describe several scenarios revealing current gaps and propose
the corresponding changes.

The missing access to the file system is a blocker now for replacing many
client apps to their web counterparts. The basic question is whether web
technologies should implement this functionality or not. I think it is a
must, though limited to a trusted zone and OSes with file systems.

By that trusted zone I mean a local network (local servers can access the
client file system via user action) or Internet location authorized by a
specific means (e.g. certificate like Java Applets).

In this trusted zone several new features (options) can be used for <input
type=file>:

A. Initial directory (URI) - by default set to {user.home}. If the initial
directory is not found, the default value is used. It improves user
experience signifficantly when browsing the same location multiple times
(and it is set by the web app accordingly).

B. Path info - when set to true, files are uploaded together with the paths
relativized to the initial directory.

C. Local compression - when set to true, selected files are compressed into
a single ZIP file before uploading.

D. Max size - the total size together with the unit (10M, 2G, 100k) which is
verified before either compressing (when enabled) or uploading. 


Selection modes:

1. Single file

2. Multiple files

3. Directory with all descendants - selected by a special dialog allowing to
select directories only; used for 1:1 copying of e.g. user document library
into the specific location of the enterprise document storage. Quick and
efficient from the user perspective.

4. Single file with parent directory and all its descendants - selected by
the standard file  dialog; the selected file is always passed as the first
in the array; used for various server/cloud solutions e.g. conversion of
your XML data together with resources (stored in directories besides the
main XML file) into various formats. Very powerful method how to transfer
both the data and the key file name at once. When compression is enabled,
that single ZIP file is transfered in the name of that key file.


How can I help with implementing this into the spec?

Thanks, Jan



More information about the whatwg mailing list