fix bugs upload ảnh nhân viên

This commit is contained in:
2020-11-13 10:10:15 +07:00
parent b030073be7
commit f489ecb7cf
4 changed files with 11 additions and 5 deletions

View File

@@ -325,7 +325,11 @@ class StaffController extends Controller {
public function actionImage() {
if (Yii::$app->request->post()) {
$model = new common();
return $model->UploadFile("AnhNhanVien", ["PNG", "JPG", "JPEG", "GIF"], "staff");
Yii::$app->response->format = "json";
return [
"dataPath" => Yii::$app->params["dataPath"],
"url" => $model->UploadFile("AnhNhanVien", ["PNG", "JPG", "JPEG", "GIF"], "staff")
];
}
}