w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
331 stars 55 forks source link

FileSystemHandle Unique ID #764

Closed a-sully closed 1 year ago

a-sully commented 2 years ago

Wotcher TAG!

I'm requesting a TAG review of FileSystemHandle Unique ID for the File System Access API.

Currently, FileSystemHandle objects can be opaquely serialized by the browser to be stored as values in IndexedDB. But there is no way for a site to generate a string from script which is guaranteed to be uniquely identifying for the file referenced by the FileSystemHandle. Several developers have requested this.

In the proposal, FileSystemHandles vend string IDs. The IDs uniquely identify the file that is referenced, but their validity is tied to the site and storage to maintain privacy guarantees.

Further details:

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

ylafon commented 1 year ago

It really looks like minting a resolver that could be an uuid-urn resolver. Have you thought about that string being an URL? (Well, URN in that case, but you have a resolver, so it is almost an URL).

ylafon commented 1 year ago

Closing this as there is nothing problematic here, however it would have been nice to have an answer about returning an uuid-urn instead of just an uuid that matches your need, as you use this as an identifier. Cheers,

a-sully commented 1 year ago

Hi all, apologies for the lack of response. I just realized I had accidentally been filtering emails related to this repo. facepalm

@ylafon you're correct that I've (perhaps naively) proposed using a uuid because that's what matches my use case (i.e. an identifier for a file which is unique per site and persistent until site data is cleared). I'm not too familiar with the range of other options available - what would be the advantage of making this a uuid-urn?

See some previous discussions about ID/URL for more context: https://github.com/whatwg/fs/pull/46#issuecomment-1217341995