Skip to content

Commit

Permalink
Merge pull request #5954 from nextcloud/textpreview_range
Browse files Browse the repository at this point in the history
Do not fetch the whole text file for the sidebar preview
  • Loading branch information
LukasReschke committed Aug 4, 2017
2 parents a1d44a7 + 3aa819c commit 3266e81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/files/js/sidebarpreviewtext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
});
}
};

Expand Down

0 comments on commit 3266e81

Please sign in to comment.