On Jul 2, 2010, at 01:34 , Jonas Sicking wrote: > Actually, i realized that I have second thoughts on some details here. > > It would be great if the "save as" functionality provided by the > SimpleBlobWriter worked such that at the time the "where do you want > to save a file" dialog pops up, the UA already knows what Blob is > going to be saved. This has several advantages over the UA first > receiving a request to save something, and then receiving the data > that is to be saved. For example: > > * If the Blob is a File, default the filename to File.name > * Allows the UA to display the size of the file, thus allowing the > user to save to different locations depending on the expected size of > the file > * Allows the UA to determine the type of the Blob and adjust the > filename based on that. Firefox does this for content-disposition > save-as dialogs.
Yes, all of those things are, I think, necessary. It is very important to be able to suggest a file name because too many users just hit save which is bad if it results in yet another Untitled-476.foo or B0B94D06-00CA-4F56-8246-539950729C4C.bar on the desktop. The ability to sanitise the file extension based on the type is also useful (I think all browsers do that). Knowing the size is simply vital, you don't want something innocuous-looking to just flood your drive. As for the bikeshed, hell it's Friday. Since we can't seem to agree on either of BlobSaver or FileSaver, how about DataSaver, or even just Saver? On thing I'd like for this interface (or one deriving from it) in future would be to know how to save streams. That way you could get a handle on your webcam and save straight to file. Or call videoFromElement on a canvas and save that cool animation to disk, create the next Pixar in WebGL entirely in the browser, etc. > As a separate question, at what URL are the latest drafts available? > Is http://dev.w3.org/2009/dap/file-system/file-writer.html still > authoritative? Yup. You're welcome to keep it there, just as well as to push it into WebApps, or over to the new hg area. If you move it, just please make sure that we have a redirect set up. -- Robin Berjon - http://berjon.com/