Merge pull request #5954 from nextcloud/textpreview_range

Do not fetch the whole text file for the sidebar preview
This commit is contained in:
Lukas Reschke 2017-08-04 11:23:42 +02:00 committed by GitHub
commit 3266e81577
1 changed files with 6 additions and 1 deletions

View File

@ -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'
}
});
}
};