作者 lyh

gx

... ... @@ -158,7 +158,7 @@ class FileController
return $this->response($files->getError(), Code::USER_ERROR);
}
$data = [
'path' => $url.$fileName,
'path' => $fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
... ... @@ -200,7 +200,7 @@ class FileController
return $this->response($file->getError(), Code::USER_ERROR);
}
$save_data[] = [
'path' => $url.$fileName,
'path' => $fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
... ...
... ... @@ -38,7 +38,7 @@ class ImageController
$this->request = request();
$this->config = config('filesystems.disks.upload');
$this->uploads = config('upload.default_image');
$this->path = $this->uploads['path'].'/';
$this->path = $this->config['root'].$this->uploads['path'].'/';
}
/**
... ... @@ -137,7 +137,7 @@ class ImageController
return $this->response($files->getError(), Code::USER_ERROR);
}
$data = [
'path' => $url.$fileName,
'path' => $fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
'hash' => $hash,
... ... @@ -197,7 +197,7 @@ class ImageController
return $this->response($file->getError(), Code::USER_ERROR);
}
$save_data[] = [
'path' => $url.$fileName,
'path' => $fileName,
'created_at' => date('Y-m-d H:i:s',time()),
'updated_at'=>date('Y-m-d H:i:s',time()),
'size' => $res->getSize(),
... ...