removed obsolete code and comments, tested with a PDF of 9 MiB and it works fine in Firefox and Chrome

This commit is contained in:
El RIDO 2019-06-15 09:47:55 +02:00
parent f915af1a5a
commit b4ceb4078d
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
3 changed files with 2 additions and 13 deletions

View file

@ -2793,17 +2793,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
.attr('src', blobUrl))
);
} else if (mimeType.match(/\/pdf/i)) {
// PDFs are only displayed if the filesize is smaller than about 1MB (after base64 encoding).
// Bigger filesizes currently cause crashes in various browsers.
// See also: https://code.google.com/p/chromium/issues/detail?id=69227
// Firefox crashes with files that are about 1.5MB
// The performance with 1MB files is bearable
/*if (data.length > 1398488) {
Alert.showError('File too large, to display a preview. Please download the attachment.'); //TODO: is this error really necessary?
return;
}*/
// Fallback for browsers, that don't support the vh unit
var clientHeight = $(window).height();