mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
bf74d13df5
* Save binary tiddlers with meta file
The filesystemadaptor plugin was a little simplistic in its
understanding of a binary file. It was using the typeInfo dictionary to
choose what tiddler types were binary (and hence needed a meta file when
saving).
I looked as if it was trying to be smart by looking for the hasMetaFile
*OR* had the encoding of base64. Unfortunately the typeInfo only defined
image/jpeg and so any other base64 encoded tiddler was assumed to be of
type text/vnd.tiddlywiki.
The net effect was only JPG images got a meta file and everything else
were saved as .tid files with base64 encoding. It all still worked but
made working with binary data in a Git repo a bit daunting.
There is enough information in the $tw.config.contentTypeInfo to
determine if a tiddler type is encoded with base64 or not. A better list
is available from boot/boot.js who registers all the types thorough the
registerFileType and marks then with base64 were appropriate.
This commit uses the typeInfo dictionary first for any filesystem
specific overrides, then the contentTypeInfo, and finally defaults to
the typeInfo["text/vnd.tiddlywiki"]. It also eliminates the now
unnecessary override for image/jpeg.
I think this might have been the original intent from commit
|
||
---|---|---|
.. | ||
async | ||
blog | ||
browser-sniff | ||
cecily | ||
classictools | ||
codemirror | ||
d3 | ||
evernote | ||
filesystem | ||
github-fork-ribbon | ||
googleanalytics | ||
help | ||
highlight | ||
internals | ||
jasmine | ||
jszip | ||
katex | ||
markdown | ||
nodewebkitsaver | ||
pluginlibrary | ||
powered-by-tiddlywiki | ||
railroad | ||
stacked-view | ||
tahoelafs | ||
text-slicer | ||
tiddlyweb | ||
translators | ||
tw2parser | ||
tw5.com-docs | ||
upgrade | ||
xmldom |