diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-08-04 11:23:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-04 11:23:42 +0200 |
commit | 3266e815775c338f29cd3586bc7cdfeaffc6e357 (patch) | |
tree | e431a84f5c6eefb703a7a7b4ee0f858f8a329ab5 /apps | |
parent | a1d44a72063c89075a1b4808794bbca94b3a7d92 (diff) | |
parent | 3aa819c62c960eb5b06a4ff29d96496ed856b95c (diff) | |
download | nextcloud-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.js | 7 |
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' + } + }); } }; |