Skip to content
Snippets Groups Projects
Commit a6293a38 authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #11390 from Nemesiz/master

Preview large TXT files fix
parents e5b4e541 83c2829c
Branches
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ class TXT extends Provider { ...@@ -34,7 +34,7 @@ class TXT extends Provider {
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) { public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
$content = $fileview->fopen($path, 'r'); $content = $fileview->fopen($path, 'r');
$content = stream_get_contents($content); $content = stream_get_contents($content,3000);
//don't create previews of empty text files //don't create previews of empty text files
if(trim($content) === '') { if(trim($content) === '') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment