diff --git a/backend/components/parsers/config.php b/backend/components/parsers/config.php index de0fcdf..78f141e 100644 --- a/backend/components/parsers/config.php +++ b/backend/components/parsers/config.php @@ -1,5 +1,9 @@ + ['ini' => ['upload_max_filesize' => '20M', + 'post_max_size integer' => '30M', + ]], 'csv' => ['web' => ['class' => 'backend\components\parsers\CustomCsvParser', diff --git a/backend/controllers/ParserController.php b/backend/controllers/ParserController.php index 588d442..ec83cb5 100644 --- a/backend/controllers/ParserController.php +++ b/backend/controllers/ParserController.php @@ -68,13 +68,19 @@ class ParserController extends BaseController $model = new UploadFileParsingForm(); // установим режим, 0 - ручная загрузка, 1 - автозагрузка $model->mode = $mode; - + //CustomVarDamp::dumpAndDie(phpinfo()); return $this->render('index', ['model' => $model]); } +// public function beforeAction($action) +// { +// if($action->actionMethod ='actionResults'){ +// CustomVarDamp::dumpAndDie(phpinfo()); +// } +// } + public function actionResults($mode = 0) { - $model = new UploadFileParsingForm(['mode' => $mode]); $data = []; if ($model->load(Yii::$app->request->post())) { diff --git a/vendor/yiisoft/multiparser/YiiMultiparser.php b/vendor/yiisoft/multiparser/YiiMultiparser.php index 503a866..eab9962 100644 --- a/vendor/yiisoft/multiparser/YiiMultiparser.php +++ b/vendor/yiisoft/multiparser/YiiMultiparser.php @@ -8,6 +8,7 @@ namespace yii\multiparser; +use common\components\CustomVarDamp; use yii\base\Component; @@ -37,5 +38,15 @@ public $configuration; return $parser->run(); } - + + public function init() + { + if( isset($this->configuration['glob']) && isset($this->configuration['glob']['ini'])){ + foreach ($this->configuration['glob']['ini'] as $ini_setting => $ini_setting_value) { + ini_set( $ini_setting, $ini_setting_value ); + } + } + + } + } \ No newline at end of file -- libgit2 0.21.4