-
Notifications
You must be signed in to change notification settings - Fork 63
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
Use of File in ShareData #181
Comments
Not saying that it wouldn't make sense to support any Blob rather than just File objects, but a File object is really nothing more than a Blob with a name, and a website can easily turn any Blob into a File object (i.e. |
What's the file name of a Blob pulled from a camera? Why should the web app have to do this extra step? If the API accepts a Blob the web page can send a File as well, the browser is free to check for the presence of the name attribute and use it, but shouldn't require it. If the underlying OS API requires a file name, the UA can synthesize one rather than putting the burden on the web developer, which would also produce inconsistent results. |
Changing |
We could make it |
File is a sub-interface of Blob so no need for a union. |
Oh yes, good point @saschanaz. However, would we lose the File class's attributes (e.g., filename) by casting it to blob via the IDL layer? 🤔 Would we use an overload instead? |
Actually, ignore the overload question there... we probably want something that can handle: |
On reflection, it's just as easy and probably better just to convert a blob into a file via the constructor. Closing. |
Sent request to TAG to close issue on their tracker https://lists.w3.org/Archives/Public/www-tag/2022Aug/0000.html |
From the TAG review:
There are other sources of data that users may want to share that aren't necessarily Files, e.g. a Blob taken directly from a media API. We recommend that File is replaced with Blob in ShareData (and possibly rename the dictionary member).
The text was updated successfully, but these errors were encountered: