From c4ea1e6e21d1ab608d827b48f7bdc259483a87a6 Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Wed, 25 Nov 2015 06:42:33 -0800 Subject: [PATCH] Increase the maximum size eligible for image transforms configurable from 4MB->16MB Summary: Also increase the timeout for the external process to complete the transform. Test Plan: Careful inspection Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: joshuaspence, cburroughs, chad, Korvin Differential Revision: https://secure.phabricator.com/D14528 --- .../files/transform/PhabricatorFileImageTransform.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/files/transform/PhabricatorFileImageTransform.php b/src/applications/files/transform/PhabricatorFileImageTransform.php index ff8bd14683..468eae0e03 100644 --- a/src/applications/files/transform/PhabricatorFileImageTransform.php +++ b/src/applications/files/transform/PhabricatorFileImageTransform.php @@ -119,9 +119,9 @@ abstract class PhabricatorFileImageTransform extends PhabricatorFileTransform { $out = new TempFile(); $future = new ExecFuture('convert %s %Ls %s', $tmp, $argv, $out); - // Don't spend more than 10 seconds resizing; just fail if it takes longer + // Don't spend more than 60 seconds resizing; just fail if it takes longer // than that. - $future->setTimeout(10)->resolvex(); + $future->setTimeout(60)->resolvex(); $data = Filesystem::readFile($out); @@ -259,7 +259,7 @@ abstract class PhabricatorFileImageTransform extends PhabricatorFileTransform { $file = $this->file; - $max_size = (1024 * 1024 * 4); + $max_size = (1024 * 1024 * 16); $img_size = $file->getByteSize(); if ($img_size > $max_size) { throw new Exception(