From: Alexander Smirnov Date: Mon, 28 Oct 2024 13:34:19 +0000 (+0300) Subject: [ERP-231] добавляет слеш в корень пути для присоединения к алиасу X-Git-Tag: 1.6~20^2~6 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=15eeeb85ef679853a911e0945ff7d9eec63e9aa3;p=erp24_rep%2Fyii-erp24%2F.git [ERP-231] добавляет слеш в корень пути для присоединения к алиасу --- diff --git a/erp24/actions/files/DownloadAction.php b/erp24/actions/files/DownloadAction.php index 8084e936..9f769eb3 100755 --- a/erp24/actions/files/DownloadAction.php +++ b/erp24/actions/files/DownloadAction.php @@ -4,13 +4,13 @@ namespace yii_app\actions\files; use Yii; use yii\base\Action; +use yii_app\services\FileService; class DownloadAction extends Action { public function run($url) { - $filepath = \Yii::getalias('@yii_app') . $url; -// $filepath = \Yii::getalias('@webroot') . DIRECTORY_SEPARATOR . $url; + $filepath = \Yii::getalias('@yii_app') . FileService::padWithSlash($url); return \Yii::$app->response->sendFile($filepath); } } \ No newline at end of file