fix

parent 7023157c
......@@ -115,12 +115,15 @@ class BidAdminController extends AdminController
$model = BidFile::findOne($id);
if($model) {
$path = BidFile::path() . $model->filename;
if(file_exists($path)) {
return Yii::$app->response->sendFile(BidFile::path() . $model->filename, $model->filename);
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
throw new NotFoundHttpException('The requested page does not exist.');
}
/**
* Finds the Bid model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
......
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