[directory-upload] Consider to remove HTMLInputElement.getFilesAndDirectories andHTMLInputElement.getFiles (#33)

Currently, without this spec, we have just one attribute to retrieve File objects: 'files'. This contains the list of files chosen by the user. It is synchronous with the 'change' event.
Personally I think we should follow the same approach with the Directory picker. Once the user chooses a directory, we populate .directories (or we add the Directory support in the FileList and in the 'files' attribute).
All the I/O needed can be done by the browser before dispatching the 'change' event. And I also like the JWatt's proposal of having willchange event (See issue #11).

If we do this, we can get rid of getFilesAndDirectories and getFiles from the HTMLInputElement completely. Directory object, of course, will still have getFilesAndDirectories and getFiles methods.

This will make the HTMLInputElement interface extremely simple and nice. And consistent: .files will be always a FileList. Here the interface:

    partial interface HTMLInputElement {
                 attribute boolean allowDirectory;
        readonly attribute DirList directories; // or just remove this and support Directory in 'files'
    };

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/directory-upload/issues/33

Received on Thursday, 24 March 2016 09:21:10 UTC