fix

parent 7023157c
...@@ -115,10 +115,13 @@ class BidAdminController extends AdminController ...@@ -115,10 +115,13 @@ class BidAdminController extends AdminController
$model = BidFile::findOne($id); $model = BidFile::findOne($id);
if($model) { if($model) {
return Yii::$app->response->sendFile(BidFile::path() . $model->filename, $model->filename); $path = BidFile::path() . $model->filename;
} else { if(file_exists($path)) {
throw new NotFoundHttpException('The requested page does not exist.'); return Yii::$app->response->sendFile(BidFile::path() . $model->filename, $model->filename);
}
} }
throw new NotFoundHttpException('The requested page does not exist.');
} }
/** /**
......
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