W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] Structured clones of Files

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 31 Jan 2011 23:13:11 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1101312310440.26730@ps20323.dreamhostps.com>
On Wed, 12 Jan 2011, Glenn Maynard wrote:
> Does the "same underlying data" of a structured clone of a File refer to 
> a reference to the file (eg. the path and filename, which is the real 
> underlying data of a File object), or the contents of the file?
> As it's used by web worker messaging, it's obviously the pathname. 
> However, HTML Storage (in theory, anyway) and IndexedDB also use 
> structured clones, and I'm guessing you're not meant to be able to store 
> a reference to a File (or FileList) persistently and reopen it later, 
> which suggests that the actual contents of the file should be stored.
> Personally, I think it's both acceptable from a security perspective and 
> incredibly useful to allow the user to grant access to a file (or--more 
> importantly--a directory, eventually) just once, and then access it from 
> then on without the user having to manually grant access each and every 
> time he uses the application, perhaps requiring one-time user permission 
> at some point to do so.  Storing a reference in an IndexedDB would allow 
> that.  But from what I recall, that's not currently meant to be allowed.

This is intended to be up to the user. We should clarify this in the File 
API specs, though.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 31 January 2011 15:13:11 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC