Preview large TXT files fix

Limit the size of the string generating the preview image for TXT files
This commit is contained in:
Nmz 2014-10-02 12:47:39 +03:00
parent 537f046e66
commit 83c2829ca8

View file

@ -34,7 +34,7 @@ class TXT extends Provider {
public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
$content = $fileview->fopen($path, 'r');
$content = stream_get_contents($content);
$content = stream_get_contents($content,3000);
//don't create previews of empty text files
if(trim($content) === '') {