mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-05 22:06:41 +00:00
Add support for downloading files
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
This commit is contained in:
@@ -21,7 +21,11 @@ var UploadSaver = function(wiki) {
|
||||
this.wiki = wiki;
|
||||
};
|
||||
|
||||
UploadSaver.prototype.save = function(text,callback) {
|
||||
UploadSaver.prototype.save = function(text,method,callback) {
|
||||
// Bail out unless this is a save (rather than a download)
|
||||
if(method !== "save") {
|
||||
return false;
|
||||
}
|
||||
// Get the various parameters we need
|
||||
var backupDir = ".",
|
||||
username = this.wiki.getTextReference("$:/UploadName"),
|
||||
|
||||
Reference in New Issue
Block a user