summaryrefslogtreecommitdiffstats
path: root/lib/private/preview
diff options
context:
space:
mode:
authorNmz <nemesiz@nmz.lt>2014-10-02 12:47:39 +0300
committerNmz <nemesiz@nmz.lt>2014-10-02 12:47:39 +0300
commit83c2829ca840d980708150d92049f35eb5e54560 (patch)
treef86eda307605be5812f07b333560392121f1f670 /lib/private/preview
parent537f046e66b16aa98c7b9fcf60e767e9f861f342 (diff)
downloadnextcloud-server-83c2829ca840d980708150d92049f35eb5e54560.tar.gz
nextcloud-server-83c2829ca840d980708150d92049f35eb5e54560.zip
Preview large TXT files fix
Limit the size of the string generating the preview image for TXT files
Diffstat (limited to 'lib/private/preview')
-rw-r--r--lib/private/preview/txt.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/preview/txt.php b/lib/private/preview/txt.php
index 2ac77faf48b..7f01b980c0e 100644
--- a/lib/private/preview/txt.php
+++ b/lib/private/preview/txt.php
@@ -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) === '') {