-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge "File and Directory Entries API" into HTML #217
Comments
Should this also include specifying the rest of the methods in There are a lot of issues with the explainer text right now (e.g. promise-returning methods returning |
@domenic: you're right. The issue as originally filed focuses only on getFilesAndDirectories() and not on the other additions. So, this issue should also include specifying the rest, namely: partial interface HTMLInputElement { |
@arunranga are you willing to submit a PR for this, or is this a request for the editors to spec out these interfaces? (And presumably the content attribute |
I'm happy to submit a PR, modulo a resolution of the procedural discussion at https://www.w3.org/Bugs/Public/show_bug.cgi?id=29154#c4 initiated by the MSFT folks. |
What is the status here @arunranga? |
Update: we're still bashing out the final API in W3C/WICG/directory-upload, including notable signature and call structure changes. |
@bakulf mentioned that one big problem is that serialization of form data now needs to be asynchronous. That reportedly has some major repercussions. Since folks are apparently implementing something or other in this space we should probably do something. It's rather irresponsible to let all those algorithms get out of sync. |
This now seems to be being specced at https://wicg.github.io/entries-api/, with several sections noted by @inexorabletash as "this should be merged into HTML". |
The entries-api attempts to specify the directory upload types and behavior as already implemented and shipping in Chrome, and apparently coming soon in Edge as well per @aliams, to ease interoperable implementations. As noted in the Explainer, "it is also very explicitly not a goal of this document to preclude further exploration of this area with APIs by other specifications that may improve the usability of this functionality" I don't know what any other browser vendors' plans are, but I'd venture it's a tad early to merge anything into HTML in this space until we've got more clarity, though. |
So Mozilla is implementing, but that specification not documenting how it affects serialization, form submission, navigation, etc. is a problem as I indicated above. |
@pwnall @inexorabletash I have a vague recollection of a discussion about finally formalizing |
cc: @mkruisselbrink I'd summarize previous discussions as something like: rather than standardizing this one, we should design a new API from scratch that doesn't have the negatives of this API - callbacks, synchronous directory traversal, etc - and then remove this one from the platform when we can. From Chrome's perspective, we've pushed forward on a more forward-looking set of file APIs in https://github.com/WICG/file-system-access/ which includes integration into drag/drop, only asynchronous iteration of directories, streams/promises everywhere, etc. I think any future investment in this space would be based on that work. Given that, it would leave what this spec covers as a redundant legacy API in the platform, which could be removed only when all browsers have shipped the new API and we've migrated sufficient deployed content off. Practically speaking, I'm skeptical of that happening in any reasonable timeframe. (I don't know if the new FS API actually has full parity at the moment though... I don't think it covers HTML form integration at all i.e. |
@inexorabletash @mkruisselbrink any update on this? Safari only exposes this on macOS at the moment, but we think at least |
Since it's been a few years, @annevk can you clarify what you mean by "this" i.e. what you would like to see here, both in terms of spec logistics and evolving the platform APIs? Are you thinking about just the issue as stated i.e. merging entries-api into HTML or File API, or the broader issue of trying to deprecate/remove entries-api in favor of File System, or identifying the gaps needed to FS to parity, or ... ? Neither @mkruisselbrink or I are super active in this space recently, but we have opinions 😉 and can loop in others. |
@inexorabletash I think in particular I'm interested in how soon deprecation might happen as perhaps we could help by only supporting select aspects on iOS. I guess if that is contingent on a File System-based replacement we're still relatively far away from that. cc @pxlcoder |
In order to enable Directory Upload via the HTMLInputElement, Mozilla and Microsoft propose a change: the addition of the getFilesAndDirectories() method, initially proposed in the WICG.
https://wicg.github.io/directory-upload/proposal.html#dom-htmlinputelement-getfilesanddirectories
This method is also defined in the FileSystem API, on the Directory object:
http://w3c.github.io/filesystem-api/#widl-Directory-getFilesAndDirectories-Promise-FileOrDirectorySequence
These provide asynchronous ways of navigating user-selected files and directories. This issue is to specify getFilesAndDirectories on the HTMLInputElement.
The text was updated successfully, but these errors were encountered: