[WICG/directory-upload] form submission should be sync; how can this work with <input type="file" directory> ? (#35)

https://html.spec.whatwg.org/multipage/forms.html#constructing-form-data-set

Form submission algorithm is sync but directory-upload API requires to explore the whole directory tree in order to submit each file contained by the selected directory and its sub-directories.
This means that this list of Files must be created before dispatching the 'change' event or we must block the main-thread and do I/O. Or we change how the form submission algorithm works.

For sure doing I/O on the main-thread is out of question.
But also creating the list of File before dispatching 'change' event doesn't seem a good idea. We can easily go out of memory (what about if the selected directory is the root of the filesystem or something similar?)

---
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/35

Received on Thursday, 14 April 2016 13:55:06 UTC