* Show server response as error message in put saver
I'd like to use this on Tiddlyhost so users can get more informative
error messages if the put save fails for whatever reason.
This would make the put saver a viable replacement for the legacy
upload saver, which is what Tiddlyhost uses currently.
I'm not sure what standard WebDAV servers do, but I would guess they
don't provide any response body for put requests, and hence this
patch would have no impact for a standard WebDAV server. (That said,
it would be a good idea to test it to make sure there aren't any
unexpected regressions for WebDAV or other put saver compatible
services.)
* Access http response status directly in put saver
There's no need to extract it from the error string created inside
tw.utils.httpRequest if we can get it directly from the xhr object.
* Add 'Save starting' notification for put saver
There are two related changes here:
1. Add a 'Save starting' notification for the put saver, similar to
the upload saver. Not sure if it was intentionally omitted for
the put saver, but it seems reasonable to have the two be
consistent.
2. Send the 'Save starting' notifications in both upload and put
save right before the actual request is sent. While testing I
noticed that the save might have failed before the "Save
starting" notification appeared which doesn't seem useful.
The default behaviour is unchanged, but if you write "yes" to
$:/UploadWithUrlOnly then it will assume it's possible to upload
with a blank username and password, as long as the host is set.
The motivation is to support a upload plugin compatible upload
service that uses some method to authenticate other than the legacy
upload plugin user/password params.
Without this patch, the user would need to enter something random in
the user and password fields for TW to decide the upload plugin can
be used.
Causes the wiki to be autosaved whenever clicking “done” after editing
a tiddler. Only works with savers that support autosave. We should
probably make autosave configurable
We were re-using the `tw-save-wiki` message both for saving the current
wiki and downloading a new wiki. Now we’ll use the separate
`tw-download-file` message for downloading.
Fixes#236