Re: [FileAPI] Blob.URN?

2010-04-29 Thread Robin Berjon
On Apr 29, 2010, at 02:36 , Eric Uhrhane wrote: I agree. Here's what I propose: FileWriter is needed for the FileSystem API. It's not a great match for a one-time export of a data Blob from a web app. I think I should take out all the how do I get a FileWriter stuff that's in [1],

Re: [FileAPI] Blob.URN?

2010-04-29 Thread Jonas Sicking
On Thu, Apr 29, 2010 at 3:00 AM, Robin Berjon ro...@berjon.com wrote: Though admittedly I'm biased because I'm not sold on the whole FileSystem API and I don't expect anyone will step up and implement it in firefox anytime soon. Care to elaborate? I don't see any significant advantages over

Re: [FileAPI] Blob.URN?

2010-04-29 Thread Jonas Sicking
On Thu, Apr 29, 2010 at 6:58 PM, Eric Uhrhane er...@google.com wrote: On Thu, Apr 29, 2010 at 3:35 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Apr 29, 2010 at 3:00 AM, Robin Berjon ro...@berjon.com wrote: Though admittedly I'm biased because I'm not sold on the whole FileSystem API and I

Re: [FileAPI] Blob.URN?

2010-04-28 Thread Eric Uhrhane
I've been going through this thread trying to figure out how to make FileWriter [1] work cleanly for the various use cases presented, and I think the reason I've been having so much trouble is that it's just a bad idea to do so. Its original design constraints rule out some of the use cases. I

Re: [FileAPI] Blob.URN?

2010-04-03 Thread Tab Atkins Jr.
On Fri, Apr 2, 2010 at 10:43 PM, Jonas Sicking jo...@sicking.cc wrote: You still can't promise anything about file size. And with the current dialogs the UA is free to improve on the current UI, for example by doing content sniffing to make sure that the correct file type is indeed being

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Eric Uhrhane
Sorry about the slow response, Dmitry. On Wed, Mar 24, 2010 at 11:29 AM, Dmitry Titov dim...@google.com wrote: Those seem to open up so many edge cases... If we have a File constructor like this, now we have a new category of File objects that do have names but are not related to actual files

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Eric Uhrhane
On Tue, Mar 30, 2010 at 2:57 PM, Darin Fisher da...@chromium.org wrote: On Tue, Mar 30, 2010 at 12:22 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Mar 23, 2010 at 2:23 PM, Darin Fisher da...@chromium.org wrote: Apologies if this has been discussed before, but I'm curious why URN is not

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Eric Uhrhane
On Thu, Apr 1, 2010 at 2:07 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Apr 1, 2010 at 1:03 AM, Darin Fisher da...@chromium.org wrote: On Wed, Mar 31, 2010 at 3:01 PM, Eric Uhrhane er...@google.com wrote: On Wed, Mar 31, 2010 at 2:40 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed,

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Eric Uhrhane
On Wed, Mar 31, 2010 at 3:55 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Mar 31, 2010 at 3:01 PM, Eric Uhrhane er...@google.com wrote: On Wed, Mar 31, 2010 at 2:40 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31,

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Dmitry Titov
On Fri, Apr 2, 2010 at 5:34 PM, Eric Uhrhane er...@google.com wrote: On Tue, Mar 30, 2010 at 2:57 PM, Darin Fisher da...@chromium.org wrote: On Tue, Mar 30, 2010 at 12:22 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Mar 23, 2010 at 2:23 PM, Darin Fisher da...@chromium.org wrote:

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Simon Pieters
On Wed, 31 Mar 2010 16:24:07 +0100, Robin Berjon ro...@berjon.com wrote: Better fallback could be achieved with button type=saveas/button. Well, that gives you a button that does nothing. It would fall back to a submit button, which could be used for saving on server or doing something

Re: [FileAPI] Blob.URN?

2010-04-02 Thread Jonas Sicking
On Fri, Apr 2, 2010 at 5:47 PM, Eric Uhrhane er...@google.com wrote: On Thu, Apr 1, 2010 at 2:07 AM, Jonas Sicking jo...@sicking.cc wrote: On Thu, Apr 1, 2010 at 1:03 AM, Darin Fisher da...@chromium.org wrote: On Wed, Mar 31, 2010 at 3:01 PM, Eric Uhrhane er...@google.com wrote: On Wed, Mar

Re: [FileAPI] Blob.URN?

2010-04-01 Thread Darin Fisher
On Wed, Mar 31, 2010 at 3:01 PM, Eric Uhrhane er...@google.com wrote: On Wed, Mar 31, 2010 at 2:40 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31, 2010, at 01:56 , Darin Fisher wrote: The only way to get a

Re: [FileAPI] Blob.URN?

2010-04-01 Thread Jonas Sicking
On Thu, Apr 1, 2010 at 1:03 AM, Darin Fisher da...@chromium.org wrote: On Wed, Mar 31, 2010 at 3:01 PM, Eric Uhrhane er...@google.com wrote: On Wed, Mar 31, 2010 at 2:40 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar

Re: [FileAPI] Blob.URN?

2010-03-31 Thread Tab Atkins Jr.
On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31, 2010, at 01:56 , Darin Fisher wrote: The only way to get a FileWriter at the moment is from input type=saveas.  What is desired is a way to simulate the load of a resource with Content-Disposition: attachment

Re: [FileAPI] Blob.URN?

2010-03-31 Thread Robin Berjon
On Mar 31, 2010, at 16:58 , Tab Atkins Jr. wrote: On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31, 2010, at 01:56 , Darin Fisher wrote: The only way to get a FileWriter at the moment is from input type=saveas. What is desired is a way to simulate the load of a

Re: [FileAPI] Blob.URN?

2010-03-31 Thread Jonas Sicking
On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31, 2010, at 01:56 , Darin Fisher wrote: The only way to get a FileWriter at the moment is from input type=saveas.  What is desired is a way to simulate the load of a resource with Content-Disposition: attachment

Re: [FileAPI] Blob.URN?

2010-03-31 Thread Eric Uhrhane
On Wed, Mar 31, 2010 at 2:40 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31, 2010, at 01:56 , Darin Fisher wrote: The only way to get a FileWriter at the moment is from input type=saveas.  What is desired is a way to

Re: [FileAPI] Blob.URN?

2010-03-31 Thread Jonas Sicking
On Wed, Mar 31, 2010 at 3:01 PM, Eric Uhrhane er...@google.com wrote: On Wed, Mar 31, 2010 at 2:40 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Mar 31, 2010 at 1:55 AM, Robin Berjon ro...@berjon.com wrote: On Mar 31, 2010, at 01:56 , Darin Fisher wrote: The only way to get a FileWriter at

Re: [FileAPI] Blob.URN?

2010-03-30 Thread Jonas Sicking
On Tue, Mar 23, 2010 at 2:23 PM, Darin Fisher da...@chromium.org wrote: Apologies if this has been discussed before, but I'm curious why URN is not a property of Blob.  It seems like it would be useful to be able to load a slice of a File.  For example, this could be used by an application to

Re: [FileAPI] Blob.URN?

2010-03-30 Thread Darin Fisher
On Tue, Mar 30, 2010 at 12:22 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Mar 23, 2010 at 2:23 PM, Darin Fisher da...@chromium.org wrote: Apologies if this has been discussed before, but I'm curious why URN is not a property of Blob. It seems like it would be useful to be able to

Re: [FileAPI] Blob.URN?

2010-03-30 Thread Jonas Sicking
On Tue, Mar 30, 2010 at 2:57 PM, Darin Fisher da...@chromium.org wrote: On Tue, Mar 30, 2010 at 12:22 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Mar 23, 2010 at 2:23 PM, Darin Fisher da...@chromium.org wrote: Apologies if this has been discussed before, but I'm curious why URN is not

Re: [FileAPI] Blob.URN?

2010-03-30 Thread Michael Nordman
There is more than just the mime type when dealing with the URLs. There at least two content headers of interest, Content-Type and Content-Disposition. Whatever mechanism involved should allow for both of these content headers to be set by the web application. On Tue, Mar 30, 2010 at 3:07 PM,

Re: [FileAPI] Blob.URN?

2010-03-30 Thread Darin Fisher
The only way to get a FileWriter at the moment is from input type=saveas. What is desired is a way to simulate the load of a resource with Content-Disposition: attachment that would trigger the browser's download manager. -Darin On Tue, Mar 30, 2010 at 4:32 PM, Jonas Sicking jo...@sicking.cc

Re: [FileAPI] Blob.URN?

2010-03-24 Thread Darin Fisher
Thanks for the explanation. The getURN method is an interesting proposal. It seems useful even when you do have a File because you might want to force the file contents to be loaded as a particular media type. -Darin On Tue, Mar 23, 2010 at 7:40 PM, Michael Nordman micha...@google.comwrote:

Re: [FileAPI] Blob.URN?

2010-03-24 Thread Anne van Kesteren
On Wed, 24 Mar 2010 03:40:36 +0100, Michael Nordman micha...@google.com wrote: This has been discussed before, not sure what the conclusion was (if any) http://www.mail-archive.com/public-webapps@w3.org/msg06137.html http://www.mail-archive.com/public-webapps@w3.org/msg06345.htmlsnip In order

Re: [FileAPI] Blob.URN?

2010-03-24 Thread Michael Nordman
Wouldn't it be better to have a constructor for File. File(Blob, name, type, contentdisposition). That could work, not sure its as intuitive. I think Files are destined to be more often returned by various APIs and less often constructed by application code directly. Wrapping a File/Blob in

Re: [FileAPI] Blob.URN?

2010-03-24 Thread Dmitry Titov
Those seem to open up so many edge cases... If we have a File constructor like this, now we have a new category of File objects that do have names but are not related to actual files on a local file system, and perhaps have different lifetime expectations. Ability to specify a name and content

[FileAPI] Blob.URN?

2010-03-23 Thread Darin Fisher
Apologies if this has been discussed before, but I'm curious why URN is not a property of Blob. It seems like it would be useful to be able to load a slice of a File. For example, this could be used by an application to fetch all of its subresources out of a single file. -Darin

Re: [FileAPI] Blob.URN?

2010-03-23 Thread Dmitry Titov
Blob would need a content-type for that, but it could probably easy be added as a property that is assignable. BTW if the Blob could have a urn and mime type, this info could be directly used to form the headers for the Blob when sending it in multipart form using FormData. Dmitry On Tue, Mar

Re: [FileAPI] Blob.URN?

2010-03-23 Thread Michael Nordman
This has been discussed before, not sure what the conclusion was (if any) http://www.mail-archive.com/public-webapps@w3.org/msg06137.html http://www.mail-archive.com/public-webapps@w3.org/msg06345.htmlsnip In order for the URN to be useful, it would have to have a mediaType associated with it,