Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-08 16:19:19 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-08 16:19:19 +0300
commit9e2a6867b0578e8b106166ebe4506c9a3817eae5 (patch)
treef3b20288b7d929abf626310d41586c914a008fd3 /js
parent95c88677ef03f29607450ed02204c26f505ca251 (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.js6
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('(&#133;)');
ellipsis.appendTo('#imgframe');