Merge pull request #5954 from nextcloud/textpreview_range
Do not fetch the whole text file for the sidebar preview
This commit is contained in:
commit
3266e81577
|
@ -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…
Reference in New Issue