diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-08 16:19:19 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-08 16:19:19 +0300 |
commit | 9e2a6867b0578e8b106166ebe4506c9a3817eae5 (patch) | |
tree | f3b20288b7d929abf626310d41586c914a008fd3 /js | |
parent | 95c88677ef03f29607450ed02204c26f505ca251 (diff) |
Don't do do json just return a blob of text
* Fix JS
* Request more data
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'js')
-rw-r--r-- | js/public-share.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/public-share.js b/js/public-share.js index eb00eb0..28edf39 100644 --- a/js/public-share.js +++ b/js/public-share.js @@ -86,11 +86,11 @@ $(document).ready(function(){ $.ajax({ url: OC.generateUrl('/apps/files_texteditor/public/{token}', { token: sharingToken }), headers: { - 'Range': 'bytes=0-1000' + 'Range': 'bytes=0-524288' } }).success(function(content) { var textDiv = $('<div/>').addClass('text-preview default-overridden'); - textDiv.text(content.filecontents); + textDiv.text(content); previewElement .removeClass('icon-loading') @@ -98,7 +98,7 @@ $(document).ready(function(){ .append(textDiv); var divHeight = textDiv.height(); - if (content.filecontents.length > 999) { + if (content.length > 50000) { var ellipsis = $('<div/>').addClass('ellipsis'); ellipsis.html('(…)'); ellipsis.appendTo('#imgframe'); |