diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-05-28 15:36:28 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-05-28 15:36:28 +0200 |
commit | 2daef7c7dcacc4b0bf6fc650d0d3ef330db11eee (patch) | |
tree | 853b23f4b2dfad8b9e1f5c206aa68ddc5c679b36 /apps | |
parent | e1483f65c3cd800f90e962764b06bf2379ca4432 (diff) | |
download | nextcloud-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.js | 2 |
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({ |