[whatwg] Upload enhancements
Dear All, I've seen many similar threads with 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 : 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
Re: [whatwg] Forms: and directory tree picking
On Oct 2, 2013 6:51 PM, "Glenn Maynard" wrote: > > On Wed, Oct 2, 2013 at 7:48 PM, Jonas Sicking wrote: >> >> Proposals for filesystem is just part of what we need. We also need a way >> >> to expose it through HtMLInputElement. And a way to allow not exposing the >> files through .files. > > > Assuming for now that we need separate modes for files and directories, I'd suggest , which causes a directory picker to be shown, doesn't populate .files at all, and adds an API entry point to retrieve a filesystem. If somebody suggests an implementable way to expose UI that doesn't need to separate files and directories then we may want something else, but that doesn't seem likely to me. > > (Implementations could still allow selecting individual files, or groups of files, as long as it's exposed transparently as if they're files in a directory. So, something like type=filesystem might be a better name.) The downside with this approach is that it doesn't work well on systems that doesn't have a filesystem in the traditional sense though. Such as most mobile platforms. I'd rather extend such that platforms that have directories can expose those, and ones that don't just expose files. And on platforms that have combined file-or-directory pickers can render a single button, and platforms that use separate Widgets can render two buttons. Then we of course need to deal with pages that want to do their own styling... / Jonas