1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 05:19:57 +00:00

Fix support for zip files in some environments (#4432)

In some environments (at least on my own machine), TiddlyWiki detects zip files as type `"application/x-zip-compressed"` instead of `"application/zip"`. This commit adds support for zip files with type `"application/x-zip-compressed"` so that they are encoded in `"base64"` like other zip files with type `"application/zip"`.
This commit is contained in:
Lee Sheng Long 2020-02-01 01:08:28 +11:00 committed by GitHub
parent 96eca32b11
commit 80b066f409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2245,6 +2245,7 @@ $tw.boot.startup = function(options) {
$tw.utils.registerFileType("application/json","utf8",".json"); $tw.utils.registerFileType("application/json","utf8",".json");
$tw.utils.registerFileType("application/pdf","base64",".pdf",{flags:["image"]}); $tw.utils.registerFileType("application/pdf","base64",".pdf",{flags:["image"]});
$tw.utils.registerFileType("application/zip","base64",".zip"); $tw.utils.registerFileType("application/zip","base64",".zip");
$tw.utils.registerFileType("application/x-zip-compressed","base64",".zip");
$tw.utils.registerFileType("image/jpeg","base64",[".jpg",".jpeg"],{flags:["image"]}); $tw.utils.registerFileType("image/jpeg","base64",[".jpg",".jpeg"],{flags:["image"]});
$tw.utils.registerFileType("image/png","base64",".png",{flags:["image"]}); $tw.utils.registerFileType("image/png","base64",".png",{flags:["image"]});
$tw.utils.registerFileType("image/gif","base64",".gif",{flags:["image"]}); $tw.utils.registerFileType("image/gif","base64",".gif",{flags:["image"]});