directory-upload
directory-upload copied to clipboard
Should Directory be cloneable?
Scenario:
- User drag-drops a directory onto a page
- Page wants to delegate to its controlling Service Worker, so uses
postMessage()
This could be done by traversing the directory structure, minting paths, and posting an array of (path, File) pairs, but if we're introducing a Directory primitive it seems like it should be cloneable.
In firefox we are implementing them as clonable, but would be nice to have this defined in the spec. I think Directory should clonable, exactly like File and Blob are.
Yeah, we should make this explicit in the spec.