kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Add some logging for file import/paste
rodzic
ae756ddff0
commit
853f5fd064
|
@ -1699,7 +1699,8 @@ $tw.boot.startup = function(options) {
|
||||||
themesEnvVar: "TIDDLYWIKI_THEME_PATH",
|
themesEnvVar: "TIDDLYWIKI_THEME_PATH",
|
||||||
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
|
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
|
||||||
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
|
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
|
||||||
}
|
},
|
||||||
|
log: {} // Log flags
|
||||||
});
|
});
|
||||||
if(!$tw.boot.tasks.readBrowserTiddlers) {
|
if(!$tw.boot.tasks.readBrowserTiddlers) {
|
||||||
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
|
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
|
||||||
|
|
|
@ -1101,6 +1101,10 @@ exports.readFile = function(file,callback) {
|
||||||
// Figure out if we're reading a binary file
|
// Figure out if we're reading a binary file
|
||||||
var contentTypeInfo = $tw.config.contentTypeInfo[type],
|
var contentTypeInfo = $tw.config.contentTypeInfo[type],
|
||||||
isBinary = contentTypeInfo ? contentTypeInfo.encoding === "base64" : false;
|
isBinary = contentTypeInfo ? contentTypeInfo.encoding === "base64" : false;
|
||||||
|
// Log some debugging information
|
||||||
|
if($tw.log.FILES) {
|
||||||
|
console.log("Importing file '" + file.name + "', type: '" + type + "', isBinary: " + isBinary);
|
||||||
|
}
|
||||||
// Create the FileReader
|
// Create the FileReader
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
// Onload
|
// Onload
|
||||||
|
|
Ładowanie…
Reference in New Issue