[Pkg-owncloud-commits] [owncloud] 165/457: Fallback to picture preview for IE <= 9

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:05:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 2daef7c7dcacc4b0bf6fc650d0d3ef330db11eee
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Thu May 28 15:36:28 2015 +0200

    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.
---
 apps/files_sharing/js/public.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index c5934a4..17bee7b 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({

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list