Current capability for adding binary files to TW under node.js?

This worked, thank you! Now the only thing left is, how do I make it so when I first open the tiddler it shows the “this tiddler contains binary data” banner in view mode? This is how other office files work. With Project files, I see that in edit mode, but in view mode it shows the gibberish text.

The practical result is that I have an extra click or two to open the Project file, versus other Office files.

Try changing the tiddler text above to:

exports.after = ["startup"];
exports.synchronous = true;

exports.startup = function() {
	$tw.utils.registerFileType("application/vnd.ms-project","base64",".mpp");
	$tw.Wiki.parsers["application/vnd.ms-project"] = $tw.Wiki.parsers["application/octet-stream"];
};
1 Like

This solved it, thank you very much!
And thank you to everyone that responded on this thread. I’m amazed by how quick everyone was to help.

Because the complete solution includes input from two different posts, I’m combining it here for others to reference more easily. Special thanks to TW_Tones and Jeremy Ruston for their help (and to everyone that responded). And of course great thanks to Jeremy Ruston for creating Tiddlywiki itself!

PART 1

PART 2

2 Likes