Merge pull request #5954 from nextcloud/textpreview_range

Do not fetch the whole text file for the sidebar preview
pull/5971/merge
Lukas Reschke 9 years ago committed by GitHub
commit 3266e81577
  1. 7
      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'
}
});
}
};

Loading…
Cancel
Save