mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Fixes for upload saver
This commit is contained in:
parent
3b86f76bab
commit
85068ab0b3
@ -26,6 +26,11 @@ UploadSaver.prototype.save = function(text) {
|
||||
password = $tw.utils.getPassword("upload"),
|
||||
uploadDir = ".",
|
||||
url = this.wiki.getTextReference("$:/UploadURL");
|
||||
// Bail out if we don't have the bits we need
|
||||
if(!userName || userName.toString().trim() === "" || !password || password.toString().trim() === "") {
|
||||
return false;
|
||||
}
|
||||
// Construct the url if not provided
|
||||
if(!url) {
|
||||
url = "http://" + userName + ".tiddlyspot.com/store.cgi";
|
||||
}
|
||||
@ -68,7 +73,7 @@ UploadSaver.prototype.info = {
|
||||
Static method that returns true if this saver is capable of working
|
||||
*/
|
||||
exports.canSave = function(wiki) {
|
||||
return wiki.tiddlerExists("$:/UploadName");
|
||||
return true;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user