Fallback to picture preview for IE <= 9

IE 9 and below do not provide window.btoa and there is currently no way
to generate base64 strings without introducting further dependencies.

So for now the solution is to fall back to the ugly picture mode for
text files whenever IE <= 9 is used.
This commit is contained in:
Vincent Petry 2015-05-28 15:36:28 +02:00
parent e1483f65c3
commit 2daef7c7dc
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ OCA.Sharing.PublicApp = {
(maxGifSize === -1 || fileSize <= (maxGifSize * 1024 * 1024))) {
img.attr('src', $('#downloadURL').val());
img.appendTo('#imgframe');
} else if (mimetype.substr(0, mimetype.indexOf('/')) === 'text') {
} else if (mimetype.substr(0, mimetype.indexOf('/')) === 'text' && window.btoa) {
// Undocumented Url to public WebDAV endpoint
var url = parent.location.protocol + '//' + location.host + OC.linkTo('', 'public.php/webdav');
$.ajax({