W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: File Save As

From: Florian Bösch <pyalot@gmail.com>
Date: Sat, 5 Jan 2013 20:29:05 +0100
Message-ID: <CAOK8ODij+63LoYVW1gJCcGhGBk11LjnAunCXpek-0SVyrx1FiA@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: Webapps WG <public-webapps@w3.org>
On Sat, Jan 5, 2013 at 7:42 PM, Glenn Maynard <glenn@zewt.org> wrote:
> Note that for saving dynamically-generated content to disk, you probably
> want FileSaver rather than @download.  With @download you have to put the
> whole file in a data: URL, which doesn't scale to larger files--you
> want to put a 100 MB video file in a data: URL, and you don't always want
> constantly update the contents of a link (which may be expensive).
I agree.

> These are issues with the browser you're using, not the spec.  I don't
> you ever said which browser you're using, but you should file a bug on it
> you think the behavior is wrong.  (Chrome has a tendency to save without
> asking the user for a location or filename, so #2 may be by design if
> the browser you're in.)
It's merely an illustration how the existing functionality isn't
providing an adequate UX

> In principle, calling .click() on the anchor should do this, exactly the
> same as you can do with an <input type=file>.  I don't know if this is
> actually implemented or allowed by browsers, and if it is I assume it
> only be allowed on user interaction.
It's not implemented also not on user interaction.

> FileSaver corresponds to "save as": when you create a FileSaver, the
> should ask the user where to save the blob.  (There doesn't seem to be a
> to suggest a filename, though, which seems like an important thing to be
> missing.  Maybe that's waiting for a File constructor, which would allow
> attaching a filename to the blob?  That seems a bit awkward, and it's not
> the spec yet, so I'm not sure.)
The specification mentions a window.saveAs function but the naming is
probably in flux. But yes, essentially it's important to be able to:
- Do an async write from a file writer
- Suggest a name for a file
- trigger the Save As dialog

> No feature on the platform that I know of allows writing over a file the
> user already saved without prompting.  I'm guessing the security
> considerations here are difficult.
True. Being able to bring up the Save As dialog would already help the
UX a lot. Bringing up the Save As dialog for every save is still not
really good UX though. I think however that you'll have to cross that
bridge eventually if the push is to bridge the native/web gap.
Received on Saturday, 5 January 2013 19:29:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:58 UTC