mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 22:33:50 +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"),
|
password = $tw.utils.getPassword("upload"),
|
||||||
uploadDir = ".",
|
uploadDir = ".",
|
||||||
url = this.wiki.getTextReference("$:/UploadURL");
|
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) {
|
if(!url) {
|
||||||
url = "http://" + userName + ".tiddlyspot.com/store.cgi";
|
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
|
Static method that returns true if this saver is capable of working
|
||||||
*/
|
*/
|
||||||
exports.canSave = function(wiki) {
|
exports.canSave = function(wiki) {
|
||||||
return wiki.tiddlerExists("$:/UploadName");
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user