fix bugs upload ảnh nhân viên
This commit is contained in:
@@ -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")
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user