mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +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:
parent
5b4825cf1e
commit
c4ea1e6e21
1 changed files with 3 additions and 3 deletions
|
@ -119,9 +119,9 @@ abstract class PhabricatorFileImageTransform extends PhabricatorFileTransform {
|
||||||
$out = new TempFile();
|
$out = new TempFile();
|
||||||
|
|
||||||
$future = new ExecFuture('convert %s %Ls %s', $tmp, $argv, $out);
|
$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.
|
// than that.
|
||||||
$future->setTimeout(10)->resolvex();
|
$future->setTimeout(60)->resolvex();
|
||||||
|
|
||||||
$data = Filesystem::readFile($out);
|
$data = Filesystem::readFile($out);
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ abstract class PhabricatorFileImageTransform extends PhabricatorFileTransform {
|
||||||
|
|
||||||
$file = $this->file;
|
$file = $this->file;
|
||||||
|
|
||||||
$max_size = (1024 * 1024 * 4);
|
$max_size = (1024 * 1024 * 16);
|
||||||
$img_size = $file->getByteSize();
|
$img_size = $file->getByteSize();
|
||||||
if ($img_size > $max_size) {
|
if ($img_size > $max_size) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
|
Loading…
Reference in a new issue