Yii 2. Upload document outside public folder
问题 I have a requirement to upload a document to server, since it is a personal one, they want it to be uploaded outside public folder. I know how to upload a file: if ($model->load(Yii::$app->request->post())) { $model->document = UploadedFile::getInstance($model, 'document'); if ($model->upload() !== false) { $model->save(); } return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } But how do I read it since a Url will not be able