On 6.1.2013 8:22, Florian Bösch wrote:
On Sun, Jan 6, 2013 at 1:33 AM, Boris Zbarsky <[email protected]
<mailto:[email protected]>> wrote:
This, I agree is a problem.
The semantic used by countless applications and which is an extremely
well established UX pattern is:
- First "Save" -> Open Save As dialog
- Subsequent "Save" -> overwrite previous location
- Any "Save As" -> Always opens a Save As dialog
Lacking this is not a dealbreaker, but it unpleasantly departs from
known functionality and makes things that little more inconvenient for
the user and keeps reminding him he's using a webapp.
Yes, this is application/UI/UX issue, from programmers' point of view,
it's up to me, whether I decide to give user the possibility to choose
file (path) or whether I siply open some kind of file stream somewhere
and write into it. But that is not possible for web apps due to
security. But this could be a way for JS API. Give blob/file/stream both
functions and the first call of either save or saveAs on such object
would always trigger Save As dialog, subsequent call to save() would
only flush data on disc, while saveAs() would trigger the dialog again,
write to new file and assign new file name for subsequent save() calls.
Unless I missed something, Blobs/Files cannot be changed once created,
but this could & should work for streams at least (because always
forcing user to select the same file over and over again is poor
design... application already has been granted acces to certain file).
BTW it would be great if application could get some persistent disc file
URN and persistent priveleges to it (if user select file once,
application would be able to asses such file always (in next session)
without user having to select it once again, the same for writing), so
application would only remember files URN (IndexDB, LocalStorage,
whatever) and access it anytime later. Origin based of course.
Brona