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:
parent
e1483f65c3
commit
2daef7c7dc
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue