fix

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