1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +01:00

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
This commit is contained in:
Nipunn Koorapati 2015-11-25 06:42:33 -08:00 committed by epriestley
parent 5b4825cf1e
commit c4ea1e6e21

View file

@ -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(