|
...
|
...
|
@@ -79,14 +79,13 @@ class FileController |
|
|
|
* @time :2023/6/17 16:32
|
|
|
|
*/
|
|
|
|
public function upload() {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->request->validate([
|
|
|
|
'file'=>['required'],
|
|
|
|
],[
|
|
|
|
'file.required'=>'必须填写',
|
|
|
|
]);
|
|
|
|
$files = $this->request->file('file');
|
|
|
|
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入111', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
if (empty($files)) {
|
|
|
|
$this->response('没有上传的文件!');
|
|
|
|
}
|
|
...
|
...
|
@@ -95,6 +94,7 @@ class FileController |
|
|
|
if ($type == 'multi') {
|
|
|
|
return $this->multi($files);
|
|
|
|
} else {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入333', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
return $this->single($files);
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -310,6 +310,7 @@ class FileController |
|
|
|
public function setUrl(){
|
|
|
|
//A端上传
|
|
|
|
if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入222', true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->path = $this->uploads['path_a'].'/'.$this->file_type[$this->param['refer']].'/'.date('Y-m');
|
|
|
|
}else{
|
|
|
|
//B端上传,upload_method 为 1时 强制上传到本地
|
...
|
...
|
|