Re: File Save As

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
wouldn't
> want to put a 100 MB video file in a data: URL, and you don't always want
to
> 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
think
> you ever said which browser you're using, but you should file a bug on it
if
> 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
that's
> 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
would
> 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
browser
> should ask the user where to save the blob.  (There doesn't seem to be a
way
> 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
in
> 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