public function actionDelete()
    {
        if (isset($_POST['id'])) {
            $id =  $_POST['id'];
            $model = Media::findOne($id);
            if (!empty($model) &&  $model->delete()) {
               \Yii::$app->response->format = Response::FORMAT_JSON;
               return [
                   'code' => 200,
                   'message' => \Yii::t('app',  "The file {$model->name} has been deleted successfully!")
               ];
            }
        }
        return [
            'code' => 404,
            'message' => \Yii::t('app', 'Selected file could not be found')
        ];
    }