1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-22 23:16:53 +00:00

Add some logging for file import/paste

This commit is contained in:
Jermolene 2014-11-08 08:37:08 +00:00
parent ae756ddff0
commit 853f5fd064
2 changed files with 6 additions and 1 deletions

View File

@ -1699,7 +1699,8 @@ $tw.boot.startup = function(options) {
themesEnvVar: "TIDDLYWIKI_THEME_PATH",
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
}
},
log: {} // Log flags
});
if(!$tw.boot.tasks.readBrowserTiddlers) {
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}

View File

@ -1101,6 +1101,10 @@ exports.readFile = function(file,callback) {
// Figure out if we're reading a binary file
var contentTypeInfo = $tw.config.contentTypeInfo[type],
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
var reader = new FileReader();
// Onload