summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-05-28 15:36:28 +0200
committerVincent Petry <pvince81@owncloud.com>2015-05-28 15:36:28 +0200
commit2daef7c7dcacc4b0bf6fc650d0d3ef330db11eee (patch)
tree853b23f4b2dfad8b9e1f5c206aa68ddc5c679b36 /apps
parente1483f65c3cd800f90e962764b06bf2379ca4432 (diff)
downloadnextcloud-server-2daef7c7dcacc4b0bf6fc650d0d3ef330db11eee.tar.gz
nextcloud-server-2daef7c7dcacc4b0bf6fc650d0d3ef330db11eee.zip
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.
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/public.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index c5934a4f609..17bee7b3b68 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -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({