summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-08-04 11:23:42 +0200
committerGitHub <noreply@github.com>2017-08-04 11:23:42 +0200
commit3266e815775c338f29cd3586bc7cdfeaffc6e357 (patch)
treee431a84f5c6eefb703a7a7b4ee0f858f8a329ab5 /apps
parenta1d44a72063c89075a1b4808794bbca94b3a7d92 (diff)
parent3aa819c62c960eb5b06a4ff29d96496ed856b95c (diff)
downloadnextcloud-server-3266e815775c338f29cd3586bc7cdfeaffc6e357.tar.gz
nextcloud-server-3266e815775c338f29cd3586bc7cdfeaffc6e357.zip
Merge pull request #5954 from nextcloud/textpreview_range
Do not fetch the whole text file for the sidebar preview
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/sidebarpreviewtext.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/sidebarpreviewtext.js b/apps/files/js/sidebarpreviewtext.js
index a19a349701b..3053cd6945d 100644
--- a/apps/files/js/sidebarpreviewtext.js
+++ b/apps/files/js/sidebarpreviewtext.js
@@ -35,7 +35,12 @@
},
getFileContent: function (path) {
- return $.get(OC.linkToRemoteBase('files' + path));
+ return $.ajax({
+ url: OC.linkToRemoteBase('files' + path),
+ headers: {
+ 'Range': 'bytes=0-10240'
+ }
+ });
}
};