fix

parent 7aef4e97
......@@ -130,8 +130,6 @@ return [
'showScriptName' => false,
'enableStrictParsing' => true,
'rules' => [
'bids/bod-admin/download/<file>' => 'bids/bod-admin/download',
'<module_id>/settings/manage' => 'settings/manage',
'<module_id>/settings/create' => 'settings/create',
'<module_id>/settings/update/<id>' => 'settings/update',
......
......@@ -110,9 +110,9 @@ class BidAdminController extends AdminController
return $this->redirect(['/bids/bid-admin/manage']);
}
public function actionDownload($file)
public function actionDownload($id)
{
$model = BidFile::find()->where(['filename' => $file])->one();
$model = BidFile::findOne($id);
if($model) {
return Yii::$app->response->sendFile(BidFile::path() . $model->filename, $model->filename);
......
......@@ -81,7 +81,7 @@ class BidFile extends \common\components\ActiveRecordModel
public function getUrl()
{
return Yii::$app->params['backUrl'] . '/bids/bid-admin/download/' . $this->filename;
return Yii::$app->params['backUrl'] . '/bids/bid-admin/download/' . $this->id;
}
public static function path()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment